xinyiZzz commented on a change in pull request #8605:
URL: https://github.com/apache/incubator-doris/pull/8605#discussion_r833044761
##########
File path: be/src/runtime/thread_mem_tracker_mgr.h
##########
@@ -101,13 +93,36 @@ class ThreadMemTrackerMgr {
// Thread update_tracker may be called very frequently, adding a memory
copy will be slow.
std::string update_tracker(const std::shared_ptr<MemTracker>& mem_tracker);
+ void update_tracker_id(const std::string& tracker_id) {
+ if (tracker_id != _tracker_id) {
+ _untracked_mems[_tracker_id] += _untracked_mem;
+ _untracked_mem = 0;
+ _tracker_id = tracker_id;
+ }
+ }
+
+ inline ConsumeErrCallBackInfo update_consume_err_cb(const std::string&
cancel_msg,
+ bool cancel_task,
ERRCALLBACK cb_func) {
+ _temp_consume_err_cb = _consume_err_cb;
+ _consume_err_cb.cancel_msg = cancel_msg;
+ _consume_err_cb.cancel_task = cancel_task;
+ _consume_err_cb.cb_func = cb_func;
+ return _temp_consume_err_cb;
+ }
+
+ inline void update_consume_err_call_back(const ConsumeErrCallBackInfo&
consume_err_cb) {
+ _consume_err_cb = consume_err_cb;
+ }
+
// Note that, If call the memory allocation operation in TCMalloc
new/delete Hook,
// such as calling LOG/iostream/sstream/stringstream/etc. related methods,
// must increase the control to avoid entering infinite recursion,
otherwise it may cause crash or stuck,
void cache_consume(int64_t size);
void noncache_consume();
+ bool attach_task() { return _task_id != ""; }
Review comment:
fix, `is_attach_task` sounds ok, em em
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]