Repository navigation
Use UNLINK for cohort cleanup and enable lazy expiry in examples - #46
Draft
adrianliu0815 wants to merge 1 commit into
Draft
adrianliu0815 wants to merge 1 commit into
adrianliu0815 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large cohort cleanup can block unrelated Redis requests even after streamed diff removes
SDIFFSTORE: explicit deletion still usesDEL, and retired or abandoned member sets still expire through Redis.This change uses
UNLINKfor explicit cohort member/blob deletion and legacy diff temporary-key cleanup in both standalone and cluster clients. It preserves the previous-version read grace period, publication ordering, and pending-version TTLs. The Docker Compose example enableslazyfree-lazy-expire=yes; the README documents persistent server configuration, managed Redis, failover nodes, ACL requirements, and memory monitoring.Existing deployments still need
lazyfree-lazy-expire=yeson their Redis servers to address TTL expiry stalls. An SDK upgrade alone does not configure those servers. The proxy does not issueCONFIG SET, remove old versions immediately, or add a process-local cleanup timer.UNLINKrequires Redis 4.0+ and command permission. The legacy diff algorithm itself is unchanged.Validation:
./gradlew test :core:ktlintCheckpassed with Java 17: 130 tests, no failures or skipped tests.UNLINKcalls, immediate key absence, repeated deletion, and TTL cleanup increasinglazyfreed_objectswith asynchronous expiry enabled.REDIS_CLUSTER_TEST_URI; standalone tests useREDIS_TEST_URI. These must point to disposable test instances.The integration tests verify cleanup behavior; they do not establish a production latency bound.