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


##########
be/src/runtime/thread_context.h:
##########
@@ -114,20 +114,22 @@
         __VA_ARGS__;                                                       \
     } while (0)
 
-#define LIMIT_LOCAL_SCAN_IO(data_dir, bytes_read)          \
-    std::shared_ptr<IOThrottle> iot = nullptr;             \
-    if (auto* t_ctx = doris::thread_context(true)) {       \
-        iot = t_ctx->get_local_scan_io_throttle(data_dir); \
-    }                                                      \
-    if (iot) {                                             \
-        iot->acquire(-1);                                  \
-    }                                                      \
-    Defer defer {                                          \
-        [&]() {                                            \
-            if (iot) {                                     \
-                iot->update_next_io_time(*bytes_read);     \
-            }                                              \
-        }                                                  \
+#define LIMIT_LOCAL_SCAN_IO(data_dir, bytes_read)                     \
+    std::shared_ptr<IOThrottle> iot = nullptr;                        \
+    auto* t_ctx = doris::thread_context(true);                        \
+    if (t_ctx) {                                                      \
+        iot = t_ctx->get_local_scan_io_throttle(data_dir);            \
+    }                                                                 \
+    if (iot) {                                                        \
+        iot->acquire(-1);                                             \
+    }                                                                 \
+    Defer defer {                                                     \
+        [&]() {                                                       \
+            if (iot) {                                                \
+                iot->update_next_io_time(*bytes_read);                \
+                t_ctx->update_total_local_scan_io_adder(*bytes_read); \

Review Comment:
   最好统一一下local 和 remote的统计的实现。
   如果在io throttle 中,已经统计了,说明iothrottle里既能统计local,也能统计remote。
   那么我们就统一使用iothrootle 里就行了,这里就不用加了



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