Repository navigation
[Cluster] Retire outdated checkpoints with shared indexes - #2144
Merged
Vasileios Zois (vazois) merged 4 commits intoSep 21, 2026
Merged
Vasileios Zois (vazois) merged 4 commits into
Vasileios Zois (vazois) merged 4 commits into
Conversation
Signed-off-by: Ethan Zhang <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix matches the reported failure and is covered by an appropriate regression test.
Pull request overview
Fixes cluster checkpoint cleanup when newer checkpoints share an older index.
Changes:
- Retires obsolete log entries while preserving shared indexes.
- Adds regression coverage for repeated checkpoint cleanup.
File summaries
| File | Description |
|---|---|
libs/cluster/Server/Replication/CheckpointStore.cs |
Preserves shared index tokens during cleanup. |
test/cluster/Garnet.test.cluster.replication/ReplicationTests/ClusterReplicationBaseTests.cs |
Verifies one readable log and shared-index retention. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Exercise the deletion loop while a replica pins a checkpoint entry, so the shared-index retirement path is verified against reader suspension as well. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: Ethan Zhang <[email protected]>
Vasileios Zois (vazois)
approved these changes
Sep 21, 2026
x@01 (x-at-01)
added a commit
to webc-fork/garnet
that referenced
this pull request
Oct 4, 2026
…soft#2156), path composition normalize (microsoft#2147), refuse serve w/o HLog checkpoint (microsoft#2153), retire outdated checkpoints (microsoft#2144), checkpoint serialize race (microsoft#2136), RecoveryRollback flaky (microsoft#2137)
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.
Summary
Checkpoint cleanup could leave an old checkpoint listed after deleting its log. Later cleanup then reads the missing log and skips truncation.
Root Cause
A newer checkpoint can reuse an older checkpoint's index. Cleanup stopped when it found that shared index, even though it had already deleted the older log.
Fix
Keep the shared index and retire the old checkpoint entry. A regression test covers three successive checkpoints.
Testing
Notes
DeleteOutdatedCheckpointsretains a deleted hlog token, causing metadata parse failures on every later checkpoint #2142.