gavinchou commented on code in PR #40597:
URL: https://github.com/apache/doris/pull/40597#discussion_r1759723630


##########
be/src/io/fs/s3_file_bufferpool.cpp:
##########
@@ -240,21 +243,28 @@ FileBufferBuilder& 
FileBufferBuilder::set_allocate_file_blocks_holder(
 }
 
 Status FileBufferBuilder::build(std::shared_ptr<FileBuffer>* buf) {
-    
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(ExecEnv::GetInstance()->s3_file_buffer_tracker());
+    auto mem_tracker = ExecEnv::GetInstance()->s3_file_buffer_tracker();
+    auto* thread_ctx = doris::thread_context(true);
+    if (thread_ctx != nullptr) {
+        // if thread local mem tracker is set, use it instead.
+        auto mem_tracker = 
thread_ctx->thread_mem_tracker_mgr->limiter_mem_tracker();

Review Comment:
   Is it typo?
   ```suggestion
           mem_tracker = 
thread_ctx->thread_mem_tracker_mgr->limiter_mem_tracker();
   ```



-- 
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

Reply via email to