{{ message }}
Repository navigation
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.

Fixes #16014
VADD ... CASon an existing set blocks the client and is replicated verbatim, soCASends up in the AOF. On replay the AOF client hasCLIENT_DENY_BLOCKING, butVADDonly dropsCASfor replicated, Lua and MULTI contexts, so the replayed command blocks the AOF client andloadSingleAppendOnlyFile()asserts. After that every restart aborts at the same spot.This adds
REDISMODULE_CTX_FLAGS_DENY_BLOCKINGto that mask soCASis ignored whenever the client can't block, and the insert runs synchronously. AOF files already written withCASload fine with the change. The new test writes twoVADD ... CASto the AOF and runsDEBUG LOADAOF; it crashes the server without the fix.Note
Medium Risk
Targets persistence replay and blocking semantics for VADD CAS; change is narrow but affects startup when AOF contains CAS commands.
Overview
Fixes AOF startup crash when the log contains
VADD ... CASon an existing vector set: replay used the threaded CAS path and tried to block the AOF client, which is not allowed.VADDnow treatsREDISMODULE_CTX_FLAGS_DENY_BLOCKINGlike replica/Lua/MULTI and clears CAS, so inserts run synchronously during AOF load (and for any other non-blocking client). Existing AOF files that already recordedCASshould replay without changing semantics beyond avoiding the block.Adds regression test
vadd_cas_aof.py: enable AOF, issue twoVADD ... CAS, runDEBUG LOADAOF, and assert the server stays up withVCARD== 2.Reviewed by Cursor Bugbot for commit 6bd5a0e. Bugbot is set up for automated code reviews on this repo. Configure here.