-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Bug] Fix bug of cumulative compaction and deletion of stale version #4593
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
When selecting candicate rowsets to do the cumulative compaction, some rowsets may not be selected because the protection time has not expired. Therefore, we need to find the current longest continuous version path in the candicate rowsets.
|
LGTM |
yangzhg
left a comment
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.
+1
be/src/olap/compaction.cpp
Outdated
| for (; i < rowsets->size(); ++i) { | ||
| RowsetSharedPtr rowset = (*rowsets)[i]; | ||
| if (rowset->start_version() != prev_rowset->end_version() + 1) { | ||
| LOG(WARNING) << "There are missed versions among rowsets. " |
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.
Is it appropriate to print the warning log here?
I think this function only deals with specific logic, and the caller can decide whether to print the log. This allows this function to be used in more scenarios.
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.
Done
Co-authored-by: Zhao Chun <buaa.zhaoc@gmail.com>
yangzhg
left a comment
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.
+1
imay
left a comment
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.
LGTM
Proposed changes
When selecting candicate rowsets to do the cumulative compaction,
some rowsets may not be selected because the protection time has not expired.
Therefore, we need to find the current longest continuous version path in the candicate rowsets.
Types of changes
Checklist