[ISSUE #10859] Fix exhausted tiered index write result - #10864
Open
yuluo-yx wants to merge 1 commit into
Open
Conversation
RockteMQ-AI
approved these changes
Aug 8, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Summary
Fixes a critical data integrity bug where TieredIndexFileStore.putKey returned AppendResult.SUCCESS even after all 3 write retries failed, potentially causing message index data loss.
Analysis
- Correctness ✅ — Returning SUCCESS when writes actually failed is a severe data integrity issue. The fix to return the actual error result from the last attempt is minimal and correct. Callers can now properly detect and handle write failures.
- Tests ✅ — Regression test mocks
FILE_FULLstatus and verifies the error propagates correctly. - Compatibility ✅ — No API changes; callers that checked the return value will now correctly receive failure instead of a false success.
LGTM.
Automated review by github-manager-bot
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #10864 +/- ##
=============================================
- Coverage 48.39% 48.29% -0.11%
+ Complexity 13562 13523 -39
=============================================
Files 1380 1380
Lines 101165 101166 +1
Branches 13127 13127
=============================================
- Hits 48962 48854 -108
- Misses 46233 46317 +84
- Partials 5970 5995 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which Issue(s) This PR Fixes
Brief Description
IndexStoreService.putKeypreviously returnedSUCCESSafter all three index write attempts failed. This change keeps the lastAppendResultand returns it when retries are exhausted, while preserving the existing success and file-rotation paths.A regression test makes the index file return
FILE_FULLthree times and verifies both the returned error and retry count.How Did You Test This Change?
mise exec java@temurin-17.0.19+10 -- mvn -pl tieredstore -am -DskipITs -Dtest=IndexStoreServiceTest -Dsurefire.failIfNoSpecifiedTests=false testBUILD SUCCESS; 11 tests, 0 failures, 0 errors, 0 skipped.