-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve](mow) improve mow get_agg by cache #48968
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:
|
|
run buildall |
TPC-H: Total hot run time: 32935 ms |
TPC-DS: Total hot run time: 192512 ms |
ClickBench: Total hot run time: 31 s |
be/src/olap/tablet_meta.cpp
Outdated
| // remove rowset delete bitmap | ||
| delete_bitmap().remove({(*it)->rowset_id(), 0, 0}, | ||
| {(*it)->rowset_id(), UINT32_MAX, 0}); | ||
| delete_bitmap().remove_rowset_cache_version((*it)->rowset_id()); |
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 a DCHECK at the end of the fucntion, to check that the size of _rowset_cache_version is smaller than the size of _rs_metas.size() + _stale_rs_metas.size() to avoid mem leak
be/src/olap/tablet_meta.cpp
Outdated
| // of cache entries in some cases? | ||
| if (val == nullptr) { // Renew if needed, put a new Value to cache | ||
| val = new AggCache::Value(); | ||
| Version start_version = _get_rowset_cache_version(bmk); |
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 a config to control whether this feature is enabled.
|
run buildall |
TPC-H: Total hot run time: 32479 ms |
TPC-DS: Total hot run time: 192371 ms |
ClickBench: Total hot run time: 30.99 s |
|
run be_ut |
zhannngchen
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
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Problem Summary: introduced by #48968, fix the rowset_cache_version is not deleted if _rs_metas or _stale_rs_metas is changed: ``` F20250319 13:41:54.708062 5890 tablet_meta.cpp:955] Check failed: false . tablet: 1742356296291, rowset_cache_version size: 1607, _rs_metas size: 135, _stale_rs_metas size: 707 *** Check failure stack trace: *** @ 0x55aa24363916 google::LogMessage::SendToLog() @ 0x55aa24360360 google::LogMessage::Flush() @ 0x55aa24364159 google::LogMessageFatal::~LogMessageFatal() @ 0x55aa19c476a9 doris::TabletMeta::delete_stale_rs_meta_by_version() @ 0x55aa19bf38b3 doris::Tablet::_delete_stale_rowset_by_version() @ 0x55aa19bf451a doris::Tablet::delete_expired_stale_rowset() @ 0x55aa19c264f8 doris::TabletManager::for_each_tablet() @ 0x55aa19c2a473 doris::TabletManager::start_trash_sweep() @ 0x55aa19bd3fa5 doris::StorageEngine::start_trash_sweep() @ 0x55aa198b9da6 doris::StorageEngine::_garbage_sweeper_thread_callback() ```
Problem Summary: introduced by #48968, fix the rowset_cache_version is not deleted if _rs_metas or _stale_rs_metas is changed: ``` F20250319 13:41:54.708062 5890 tablet_meta.cpp:955] Check failed: false . tablet: 1742356296291, rowset_cache_version size: 1607, _rs_metas size: 135, _stale_rs_metas size: 707 *** Check failure stack trace: *** @ 0x55aa24363916 google::LogMessage::SendToLog() @ 0x55aa24360360 google::LogMessage::Flush() @ 0x55aa24364159 google::LogMessageFatal::~LogMessageFatal() @ 0x55aa19c476a9 doris::TabletMeta::delete_stale_rs_meta_by_version() @ 0x55aa19bf38b3 doris::Tablet::_delete_stale_rowset_by_version() @ 0x55aa19bf451a doris::Tablet::delete_expired_stale_rowset() @ 0x55aa19c264f8 doris::TabletManager::for_each_tablet() @ 0x55aa19c2a473 doris::TabletManager::start_trash_sweep() @ 0x55aa19bd3fa5 doris::StorageEngine::start_trash_sweep() @ 0x55aa198b9da6 doris::StorageEngine::_garbage_sweeper_thread_callback() ```
Problem Summary: introduced by apache#48968, fix the rowset_cache_version is not deleted if _rs_metas or _stale_rs_metas is changed: ``` F20250319 13:41:54.708062 5890 tablet_meta.cpp:955] Check failed: false . tablet: 1742356296291, rowset_cache_version size: 1607, _rs_metas size: 135, _stale_rs_metas size: 707 *** Check failure stack trace: *** @ 0x55aa24363916 google::LogMessage::SendToLog() @ 0x55aa24360360 google::LogMessage::Flush() @ 0x55aa24364159 google::LogMessageFatal::~LogMessageFatal() @ 0x55aa19c476a9 doris::TabletMeta::delete_stale_rs_meta_by_version() @ 0x55aa19bf38b3 doris::Tablet::_delete_stale_rowset_by_version() @ 0x55aa19bf451a doris::Tablet::delete_expired_stale_rowset() @ 0x55aa19c264f8 doris::TabletManager::for_each_tablet() @ 0x55aa19c2a473 doris::TabletManager::start_trash_sweep() @ 0x55aa19bd3fa5 doris::StorageEngine::start_trash_sweep() @ 0x55aa198b9da6 doris::StorageEngine::_garbage_sweeper_thread_callback() ```
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)