This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 726e0d5ebf [fix](load) fix dead loop in _handle_mem_exceed_limit
function when reduce memory for load (#21886)
726e0d5ebf is described below
commit 726e0d5ebfcc7ceaa463b2f4b7dbb86a09b06059
Author: Xin Liao <[email protected]>
AuthorDate: Tue Jul 18 09:49:36 2023 +0800
[fix](load) fix dead loop in _handle_mem_exceed_limit function when reduce
memory for load (#21886)
---
be/src/runtime/load_channel_mgr.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/be/src/runtime/load_channel_mgr.cpp
b/be/src/runtime/load_channel_mgr.cpp
index 2a0020a9ff..3d9dbc6f19 100644
--- a/be/src/runtime/load_channel_mgr.cpp
+++ b/be/src/runtime/load_channel_mgr.cpp
@@ -371,11 +371,12 @@ void LoadChannelMgr::_handle_mem_exceed_limit() {
continue;
}
all_writers_mem.emplace_back(kv.second, item.first,
std::move(item.second));
- size_t pos = all_writers_mem.size() - 1;
-
tablets_mem_heap.emplace(std::get<2>(all_writers_mem[pos]).begin(),
-
std::get<2>(all_writers_mem[pos]).end(), pos);
}
}
+ for (size_t i = 0; i < all_writers_mem.size(); i++) {
+ tablets_mem_heap.emplace(std::get<2>(all_writers_mem[i]).begin(),
+ std::get<2>(all_writers_mem[i]).end(), i);
+ }
// reduce 1/10 memory every time
int64_t mem_to_flushed = _mem_tracker->consumption() / 10;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]