yiguolei commented on code in PR #39177:
URL: https://github.com/apache/doris/pull/39177#discussion_r1712422897


##########
be/src/runtime/workload_management/io_throttle.cpp:
##########
@@ -42,32 +48,35 @@ bool IOThrottle::acquire(int64_t block_timeout_ms) {
 }
 
 bool IOThrottle::try_acquire() {
-    if (_io_bytes_per_second < 0) {
+    if (_io_bytes_per_second_limit < 0) {
         return true;
     }
     std::unique_lock<std::mutex> w_lock(_mutex);
     return GetCurrentTimeMicros() > _next_io_time_micros;
 }
 
 void IOThrottle::update_next_io_time(int64_t io_bytes) {
-    if (_io_bytes_per_second <= 0 || io_bytes <= 0) {
+    if (_io_bytes_per_second_limit <= 0 || io_bytes <= 0) {
         return;
     }
-    int64_t read_bytes_per_second = _io_bytes_per_second;
-    std::unique_lock<std::mutex> w_lock(_mutex);
-    double io_bytes_float = static_cast<double>(io_bytes);
-    double ret = (io_bytes_float / static_cast<double>(read_bytes_per_second)) 
*
-                 static_cast<double>(MICROS_PER_SEC);
-    int64_t current_time = GetCurrentTimeMicros();
+    int64_t read_bytes_per_second = _io_bytes_per_second_limit;

Review Comment:
   这里,假如用户没有设置limit。 是不是意味着75行针对一个wg的io 统计就不生效了?



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