Skip to content

[vpj] Prevent regular batch push when there are TTL re-pushes #1949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2025

Conversation

xunyin8
Copy link
Contributor

@xunyin8 xunyin8 commented Jul 22, 2025

Problem Statement

Regular batch push and TTL re-push today are incompatible features. This is because regular batch push will wipe out the RMD needed to perform TTL re-push.

Solution

Added a new self-managed storeProperties.ttlRepushEnabled property to signal ttl-repush is enabled for a given store. The property is set to true once a TTL re-push is attempted for a store. Once the property is set to true we will disallow regular batch push.

We allow incremental push, re-push, empty pushes and batch push with record level timestamp to go through. Users can also override this check via VPJ property allow.regular.push.with.ttl.repush.

Code changes

  • Added new code behind a config. If so list the config names and their default values in the PR description.
  • Introduced new log lines.
    • Confirmed if logs need to be rate limited to avoid excessive logging.

Concurrency-Specific Checks

Both reviewer and PR author to verify

  • Code has no race conditions or thread safety issues.
  • Proper synchronization mechanisms (e.g., synchronized, RWLock) are used where needed.
  • No blocking calls inside critical sections that could lead to deadlocks or performance degradation.
  • Verified thread-safe collections are used (e.g., ConcurrentHashMap, CopyOnWriteArrayList).
  • Validated proper exception handling in multi-threaded code to avoid silent thread termination.

How was this PR tested?

New integration test and unit test

  • New unit tests added.
  • New integration tests added.
  • Modified or extended existing tests.
  • Verified backward compatibility (if applicable).

Does this PR introduce any user-facing or breaking changes?

  • No. You can skip the rest of this section.
  • Yes. Clearly explain the behavior change and its impact.

@xunyin8 xunyin8 force-pushed the block-regular-push-for-ttl branch 2 times, most recently from e16b442 to 0fe808b Compare July 29, 2025 17:52
xunyin8 added 3 commits July 31, 2025 10:56
Problem: regular batch push and TTL re-push today are incompatible features. This is because
regular batch push will wipe out the RMD needed to perform TTL re-push.

Solution: best effort approach to prevent regular batch push when we detect existence of TTL
re-push. It's best effort because we only scan through existing versions to see if TTL
re-pushes are enabled for the store. It should cover most cases since we are querying the
parent controller which has info for the past 5 versions instead of 2.

We allow incremental push, re-push and empty pushes to go through. Users can also override
this check via VPJ property allow.regular.push.with.ttl.repush.
In addition, make sure batch push with provided record level timestamps are
allowed with TTL re-push enabled stores.
@xunyin8 xunyin8 force-pushed the block-regular-push-for-ttl branch from 0fe808b to 9e5ff14 Compare July 31, 2025 20:53
Copy link
Contributor

@gaojieliu gaojieliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@xunyin8 xunyin8 merged commit 8e7941b into linkedin:main Jul 31, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants