Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #8007]fix abnormally recover index file #8018

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

3424672656
Copy link
Contributor

@3424672656 3424672656 commented Apr 11, 2024

Avoid crashes and retain the last file and switch new file to putkey.
Add a linked list correct scan check to prevent endless loops caused by file corruption, when an error is checked, messages before this message will be discarded, and set the preIndexNo of this message to -1

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 25.00000% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 42.90%. Comparing base (2fdafd2) to head (80ca45d).

Files Patch % Lines
...ava/org/apache/rocketmq/store/index/IndexFile.java 18.18% 6 Missing and 3 partials ⚠️
.../org/apache/rocketmq/store/index/IndexService.java 33.33% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8018      +/-   ##
=============================================
- Coverage      42.95%   42.90%   -0.05%     
+ Complexity     10384    10379       -5     
=============================================
  Files           1270     1270              
  Lines          88690    88705      +15     
  Branches       11401    11404       +3     
=============================================
- Hits           38097    38063      -34     
- Misses         45899    45940      +41     
- Partials        4694     4702       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] The last index file should not be deleted when the broker recovers abnormally
2 participants