github-actions[bot] commented on code in PR #19433:
URL: https://github.com/apache/doris/pull/19433#discussion_r1188075450


##########
be/src/vec/common/allocator.cpp:
##########
@@ -34,6 +34,7 @@
 
 template <bool clear_memory_, bool mmap_populate>
 void Allocator<clear_memory_, mmap_populate>::sys_memory_check(size_t size) 
const {
+    if (doris::skip_memory_check) return;

Review Comment:
   warning: statement should be inside braces 
[readability-braces-around-statements]
   
   ```suggestion
       if (doris::skip_memory_check) { return;
   }
   ```
   



##########
be/src/vec/common/allocator.cpp:
##########
@@ -74,14 +74,15 @@
                     size, 
doris::thread_context()->thread_mem_tracker()->label(),
                     
doris::thread_context()->thread_mem_tracker_mgr->last_consumer_tracker(),
                     
doris::MemTrackerLimiter::process_limit_exceeded_errmsg_str(size));
-            
doris::thread_context()->thread_mem_tracker_mgr->save_exceed_mem_limit_msg(err_msg);
-            throw std::bad_alloc {};
+            doris::MemTrackerLimiter::print_log_process_usage(err_msg);
+            throw doris::Exception(doris::ErrorCode::MEM_ALLOC_FAILED, 
err_msg);
         }
     }
 }
 
 template <bool clear_memory_, bool mmap_populate>
 void Allocator<clear_memory_, mmap_populate>::memory_tracker_check(size_t 
size) const {
+    if (doris::skip_memory_check) return;

Review Comment:
   warning: statement should be inside braces 
[readability-braces-around-statements]
   
   ```suggestion
       if (doris::skip_memory_check) { return;
   }
   ```
   



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

Reply via email to