-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](recycler) Add recycle state for rs meta to avoid data loss #58459
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
gensrc/proto/olap_file.proto
Outdated
| optional RecycleStatePB recycle_state = 111; | ||
| } | ||
|
|
||
| enum RecycleStatePB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add scope to this state, easily to be conflict
a97bb6b to
331af0c
Compare
1914e9e to
ee7e572
Compare
ee7e572 to
97b9243
Compare
|
run buildall |
FE UT Coverage ReportIncrement line coverage `` 🎉 |
TPC-H: Total hot run time: 36404 ms |
TPC-DS: Total hot run time: 177868 ms |
ClickBench: Total hot run time: 28.43 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
FE UT Coverage ReportIncrement line coverage `` 🎉 |
311dbe2 to
ffcac6b
Compare
|
run cloudut |
5c98f34 to
f6726b2
Compare
|
run cloudut |
f6726b2 to
36f9742
Compare
|
run cloudut |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 32118 ms |
TPC-DS: Total hot run time: 172675 ms |
ClickBench: Total hot run time: 27.42 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
What problem does this PR solve?
Summary
Add a
RECYCLEstate for rowset/meta (rs meta) and update the recycler logic to mark metadata asRECYCLEbefore final deletion. This reduces the risk of accidental data loss.Problem
The recycler sometimes deletes rs meta too early (race conditions, restarts, or recovery cases), which can cause metadata and file inconsistencies or data loss.
Solution
RECYCLEintermediate state for rs meta.RECYCLEand record a timestamp.RECYCLEitems as recoverable until final deletion.Main changes
RECYCLEto the rs meta state enum.RECYCLE.Test case
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)