yiguolei commented on code in PR #47784: URL: https://github.com/apache/doris/pull/47784#discussion_r1952350089
########## be/src/runtime/workload_management/memory_context.h: ########## @@ -71,13 +73,23 @@ class MemoryContext : public std::enable_shared_from_this<MemoryContext> { MemoryContext() { stats_.init_profile(); } virtual ~MemoryContext() = default; - Stats* stats() { return &stats_; } - std::shared_ptr<MemTrackerLimiter> mem_tracker() { return mem_tracker_; } + void set_resource_ctx(ResourceContext* resource_ctx) { resource_ctx_ = resource_ctx; } Review Comment: 把这个方法给成private,然后friend class 给resource context,确保只有resource context 调用这个set,其他的context 也是如此 -- 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