-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](tablet) fix stale_version_count() returning wrong value #60070
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
base: master
Are you sure you want to change the base?
Conversation
stale_version_count() was incorrectly returning _rs_metas.size() instead of _stale_rs_metas.size(), causing incorrect calculation of total version count in places like rowset_builder.cpp and push_handler.cpp where it's used as: version_count() + stale_version_count() This was effectively calculating version_count * 2 instead of the intended total of active + stale versions.
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
xy720
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
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 31295 ms |
TPC-DS: Total hot run time: 172950 ms |
ClickBench: Total hot run time: 26.88 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run nonConcurrent |
|
run buildall |
TPC-H: Total hot run time: 31526 ms |
TPC-DS: Total hot run time: 173144 ms |
ClickBench: Total hot run time: 26.79 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 31179 ms |
TPC-DS: Total hot run time: 172901 ms |
ClickBench: Total hot run time: 26.61 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Proposed changes
TabletMeta::stale_version_count()was incorrectly returning_rs_metas.size()instead of_stale_rs_metas.size().Bug Analysis
// Before (wrong)
inline size_t TabletMeta::stale_version_count() const {
return _rs_metas.size(); // ❌ should be _stale_rs_metas
}
// After (correct)
inline size_t TabletMeta::stale_version_count() const {
return _stale_rs_metas.size(); // ✅
}
This was effectively calculating version_count * 2 instead of the intended total of active + stale versions.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)