-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
memtable flush reserve process mem and improve logs #45743
base: spill_and_reserve
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
@@ -278,34 +278,44 @@ inline void ThreadMemTrackerMgr::flush_untracked_mem() { | |||
_stop_consume = false; | |||
} | |||
|
|||
inline doris::Status ThreadMemTrackerMgr::try_reserve(int64_t size) { | |||
inline doris::Status ThreadMemTrackerMgr::try_reserve(int64_t size, |
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.
把这个API 的单测补充一下
@@ -249,13 +249,22 @@ class ThreadContext { | |||
thread_mem_tracker_mgr->consume(size, skip_large_memory_check); | |||
} | |||
|
|||
doris::Status reserve_memory(const int64_t size) const { |
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.
xxx 和 try_xxx 区分不清楚是否要检查query和wg的limit。
我们换个名字,增加一个新的函数,try_reserve_process_memory
// Make sure at least one memtable is flushing even reserve memory failed. | ||
if (memtable_flush_executor->check_and_inc_has_any_flushing_task()) { | ||
// If there are already any flushing task, Wait for some time and retry. | ||
LOG(INFO) << fmt::format( |
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.
这个每1min 打印一次吧,否则内存满的时候刷屏了
break; | ||
} | ||
if (_is_shutdown()) { | ||
st = Status::Cancelled("flush memtable already cancelled"); |
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.
如果在等待期间,要flush的这个memtable 关联的导入任务呗cancel了,怎么处理?
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)