Repository navigation
MOD-16050 - CF.LOADCHUNK: replicate data chunks (backport to 8.4) - #1020
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.4` from `v8.4.5` to `v8.4.8`. | Module | From | To | |---|---|---| | RedisBloom | `v8.4.5` | `v8.4.8` | ## RedisBloom changes ([v8.4.5...v8.4.8](RedisBloom/RedisBloom@v8.4.5...v8.4.8)) - MOD-16050 — Replicate `CF.LOADCHUNK` data chunks to prevent silent Cuckoo Filter data loss on failover ([#1020](RedisBloom/RedisBloom#1020)) - MOD-13409 — Harden RDB loading, including validation of crafted module payloads ([#1039](RedisBloom/RedisBloom#1039)) ## Test plan - [x] Confirmed `v8.4.8` exists in RedisBloom - [x] Validated `modules/redisbloom/Makefile` pins `MODULE_VERSION` to `v8.4.8` - [ ] Redis core CI passes with the updated module pin <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Module upgrade touches replication and persistence parsing; failures could affect Bloom/Cuckoo data durability or availability on load, though scope is limited to the RedisBloom pin. > > **Overview** > Bumps the RedisBloom build pin from **v8.4.5** to **v8.4.8** by updating `MODULE_VERSION` in `modules/redisbloom/Makefile`, so `get_source` clones and builds the newer upstream tag. > > That range pulls in upstream fixes for **Cuckoo Filter replication** (`CF.LOADCHUNK` chunks replicated to avoid data loss on failover) and **stricter RDB load validation** for crafted module payloads. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1f168a9. 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.4release 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
Medium Risk
Replication correctness for restore/migration paths; wrong behavior caused silent replica data loss on failover, but the change is a small parity fix with existing BF.LOADCHUNK behavior plus a targeted test.
Overview
CF.LOADCHUNKnow callsRedisModule_ReplicateVerbatimafter successfully applying data chunks (not only the header at position 1), aligning cuckoo restore behavior withBF.LOADCHUNK. Without this, replicas could show correctCF.INFOcounts but empty buckets afterCF.SCANDUMP/CF.LOADCHUNKmigration—silent data loss on failover.A new integration test
test_cf_loadchunk_replicates_to_replicabuilds a multi-subfilter filter viaCF.SCANDUMP, restores it on the master withCF.LOADCHUNK, waits for replication, and asserts all items exist on the replica.Reviewed by Cursor Bugbot for commit 3dd3389. Bugbot is set up for automated code reviews on this repo. Configure here.