Repository navigation
MOD-16050 - CF.LOADCHUNK: replicate data chunks (backport to 8.2) - #1019
Merged
Merged
Conversation
…oss on failover) CFLoadChunk_RedisCommand only replicated the header chunk (pos == 1). The data chunks were applied on the primary but never propagated to replicas / AOF, so a replica of a CF.LOADCHUNK-restored cuckoo filter ended up with correct metadata (CF.INFO reports the full item count) but empty buckets. The divergence was silent - master_link_status:up, equal replication offsets and matching CF.INFO - until a failover promoted the replica, at which point every CF.EXISTS missed (a cuckoo filter has no false negatives, so this is real data loss). Add RedisModule_ReplicateVerbatim to the data-chunk branch, mirroring BFLoadChunk_RedisCommand. The RDB/DUMP/RESTORE path was already correct, so a full resync heals an affected replica; this fix closes the incremental replication gap. Includes a replication regression test that builds a filter via CF.LOADCHUNK on the primary and asserts all members are present on the replica. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
AvivDavid23
approved these changes
Jun 3, 2026
2 of 3 tasks
YaacovHazan
pushed a commit
to redis/redis
that referenced
this pull request
Jul 23, 2026
## Summary Bumps the RedisBloom pin on `8.2` from `v8.2.12` to `v8.2.15`. | Module | From | To | |---|---|---| | RedisBloom | `v8.2.12` | `v8.2.15` | ## RedisBloom changes ([v8.2.12...v8.2.15](RedisBloom/RedisBloom@v8.2.12...v8.2.15)) - MOD-16050 — Replicate `CF.LOADCHUNK` data chunks to prevent silent Cuckoo Filter data loss on failover ([#1019](RedisBloom/RedisBloom#1019)) - MOD-13409 — Harden RDB loading, including validation of crafted module payloads ([#1041](RedisBloom/RedisBloom#1041)) ## Test plan - [x] Confirmed `v8.2.15` exists in RedisBloom - [x] Validated `modules/redisbloom/Makefile` pins `MODULE_VERSION` to `v8.2.15` - [ ] Redis core CI passes with the updated module pin <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Upstream changes affect replication and persistence loading for Bloom/Cuckoo data; risk is moderate but bounded to the RedisBloom module pin, not core Redis. > > **Overview** > Bumps the RedisBloom build pin from **v8.2.12** to **v8.2.15** via `MODULE_VERSION` in `modules/redisbloom/Makefile`, so CI and packaging pull the newer upstream release. > > That release includes replication fixes for **`CF.LOADCHUNK`** (avoiding Cuckoo Filter data loss on failover) and **stricter RDB load validation** for crafted module payloads. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a95ebed. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.



Backport of MOD-16050 to the
8.2release branch (cherry-pick of master PR #1014).Problem:
CF.LOADCHUNKreplicated only the header chunk, not the data chunks, so a replica of aCF.SCANDUMP/CF.LOADCHUNK-restored cuckoo filter ended up with correctCF.INFOmetadata but empty buckets — silent, and exposed as total data loss when a failover promotes the replica.Fix: add
RedisModule_ReplicateVerbatim(ctx)to the data-chunk branch ofCFLoadChunk_RedisCommand(mirroringBFLoadChunk_RedisCommand) + a replication regression test (test_cf_loadchunk_replicates_to_replica).Verified end-to-end on 2.4 (build + test: fails on unpatched, passes with fix); identical change cherry-picked across all release branches. CI will run the regression test here.
Jira: MOD-16050
Note
High Risk
Fixes silent replication gaps on restore paths; wrong behavior caused total data loss after replica promotion until this change.
Overview
Fixes cuckoo filter restore over replication:
CF.LOADCHUNKnow callsRedisModule_ReplicateVerbatimafter loading data chunks (not only the header atpos == 1), matchingBF.LOADCHUNK.Without this, a replica could show correct
CF.INFOcounts but empty buckets, so failover would drop all items restored viaCF.SCANDUMP/CF.LOADCHUNK.Adds
test_cf_loadchunk_replicates_to_replica: master+replica env, multi-chunk restore,WAIT, then asserts allCF.EXISTSon the slave.Reviewed by Cursor Bugbot for commit 908048b. Bugbot is set up for automated code reviews on this repo. Configure here.