Support RDB v14 - Support XNACK (part 1)#98
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Reviewed by Cursor Bugbot for commit 0e0aef8. Configure here.
d73b252 to
eebe93b
Compare
eebe93b to
742062e
Compare
sggeorgiev
reviewed
May 21, 2026
sggeorgiev
reviewed
May 21, 2026
sggeorgiev
reviewed
May 21, 2026
sggeorgiev
reviewed
May 21, 2026
sggeorgiev
reviewed
May 21, 2026
…t entry Surfaces the parser's remaining-count to the NACK-zone callback so the RESP handler can flush the in-progress XNACK batch exactly when the zone ends, instead of relying on flushes in toRespEndKey, toRespStreamNewCGroup and toRespStreamIdmpMeta. Removes those three cross-callback flush sites. Fixes the symptom where XCFGSET could be emitted between XNACK commands of the same CG (XCFGSET landed between the dc=0 and dc=1 batches when the last NACK batch hadn't reached AOF_REWRITE_ITEMS_PER_CMD). The final command order now matches Redis's AOF rewrite emission at redis2/src/aof.c:2387-2442 (XNACK ... then XCFGSET). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
YaacovHazan
approved these changes
May 31, 2026
moticless
added a commit
that referenced
this pull request
Jun 3, 2026
Add support for the second Redis 8.8 RDB v14 type, RDB_TYPE_ARRAY (opcode 28), following the Stream XNACK work merged in #98. This change adds ABI-compatible public APIs for array metadata and element callbacks, an insert-index sentinel, and an invalid-state error. It also adds built-in array emission for JSON, RESP, and Print handlers. JSON preserves uint64 fidelity by stringifying indexes. RESP emits ARMSET batches and ARSEEK when a persisted non-default insert cursor exists, or uses RESTORE when supported by the target.
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.

Add support for parsing RDB v14 - XNACK (RDB_TYPE_STREAM_LISTPACKS_5.)
Core Parser:
Handlers:
Version Support:
Notes
Note
Medium Risk
Updates core stream parsing and RESP/JSON emitters to handle new v14 encodings, which could affect correctness of stream replay and raw RESTORE payloads. Risk is mitigated by new fixtures and unit/integration tests covering both downgrade behavior and 8.8+ XNACK output.
Overview
Adds RDB v14 stream support for
RDB_TYPE_STREAM_LISTPACKS_5by parsing the per-consumer-group NACK zone and surfacing it via a new public callbackhandleStreamNackZoneEntry.Extends the JSON and RESP exporters to consume this callback: JSON now emits a per-group
"nacked"array of entry IDs, while RESP generation batches NACKed IDs intoXNACK ... FAIL IDS ... RETRYCOUNT ... FORCEfor Redis targets >=8.8(and drops NACK metadata for older targets). Also adds a clean error placeholder for the new v14RDB_TYPE_ARRAYencoding.Updates version mapping (
Redis 8.8->RDB v14), adjusts CI Redis build flags to avoid clang+LTO failures on Ubuntu, and adds/updates fixtures and tests to cover v14 parsing, RESP output for targets8.6vs8.8, and the new unsupported-type error path.Reviewed by Cursor Bugbot for commit e28e525. Bugbot is set up for automated code reviews on this repo. Configure here.