yiguolei commented on code in PR #50549: URL: https://github.com/apache/doris/pull/50549#discussion_r2077078934
########## be/src/runtime/memory/thread_mem_tracker_mgr.h: ########## @@ -84,8 +84,21 @@ class ThreadMemTrackerMgr { void consume(int64_t size); void flush_untracked_mem(); + enum class TryReserveChecker { + NONE = 0, + CHECK_TASK = 1, + CHECK_WORKLOAD_GROUP = 2, + CHECK_TASK_AND_WORKLOAD_GROUP = 3, + CHECK_PROCESS = 4, + CHECK_TASK_AND_PROCESS = 5, + CHECK_WORKLOAD_GROUP_AND_PROCESS = 6, + CHECK_TASK_AND_WORKLOAD_GROUP_AND_PROCESS = 7, + }; + // if only_check_process_memory == true, still reserve query, wg, process memory, only check process memory. - MOCK_FUNCTION doris::Status try_reserve(int64_t size, bool only_check_process_memory = false); + MOCK_FUNCTION doris::Status try_reserve( Review Comment: 不要扩展这个接口,这么多枚举参数,如果后面真的有用的话,这种组合我们写代码会很费劲。 如果我们觉得only_check_process_memory 这个参数有问题,我建议,我们单独写一个函数,叫reserve process memory。 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org