Fix ClusterRangeIndexCheckpointSyncWithEviction test: force flush.bftree generation#1848
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a flaky cluster replication test for RangeIndex by ensuring the flush path runs (so *.flush.bftree snapshot files are produced), and expands CI coverage to include the dedicated RangeIndex cluster replication test project.
Changes:
- Update
ClusterRangeIndexCheckpointSyncWithEvictionto generate additional log traffic after creating RangeIndex keys so a flush is triggered and*.flush.bftreefiles are created. - Add
Garnet.test.cluster.replication.rangeindexto the GitHub Actions CI cluster test matrix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/cluster/Garnet.test.cluster.replication.rangeindex/ClusterRangeIndexReplicationTests.cs |
Adds filler writes intended to force log flush so *.flush.bftree files are generated before checkpoint/sync assertions. |
.github/workflows/ci.yml |
Extends cluster test matrix to run the RangeIndex replication test project in CI. |
TedHartMS
approved these changes
Jun 3, 2026
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.
The test was failing because lowMemory: true alone does not guarantee RI records get flushed to disk. With only 2 RI keys in a 2KB log, the pages never advance past ReadOnlyAddress.
Fix: After creating the RI indexes, write 100 regular string keys to fill the log and push RI records past the read-only boundary, triggering
OnFlush→SnapshotTreeForFlush→flush.bftreefile creation.Also adds
Garnet.test.cluster.replication.rangeindexto the CI cluster test matrix.