wangbo commented on code in PR #38048:
URL: https://github.com/apache/doris/pull/38048#discussion_r1682389383


##########
be/src/runtime/query_statistics.h:
##########
@@ -53,82 +52,44 @@ class QueryStatistics {
 
     void merge(const QueryStatistics& other);
 
-    void add_scan_rows(int64_t delta_scan_rows) {
-        this->scan_rows.fetch_add(delta_scan_rows, std::memory_order_relaxed);
-    }
+    void add_scan_rows(int64_t delta_scan_rows) { scan_rows += 
delta_scan_rows; }
 
-    void add_scan_bytes(int64_t delta_scan_bytes) {
-        this->scan_bytes.fetch_add(delta_scan_bytes, 
std::memory_order_relaxed);
-    }
+    void add_scan_bytes(int64_t delta_scan_bytes) { scan_bytes += 
delta_scan_bytes; }
 
-    void add_cpu_nanos(int64_t delta_cpu_time) {
-        this->cpu_nanos.fetch_add(delta_cpu_time, std::memory_order_relaxed);
-    }
+    void add_cpu_nanos(int64_t delta_cpu_time) { cpu_nanos += delta_cpu_time; }
 
-    void add_shuffle_send_bytes(int64_t delta_bytes) {
-        this->shuffle_send_bytes.fetch_add(delta_bytes, 
std::memory_order_relaxed);
-    }
+    void add_shuffle_send_bytes(int64_t delta_bytes) { shuffle_send_bytes += 
delta_bytes; }
 
-    void add_shuffle_send_rows(int64_t delta_rows) {
-        this->shuffle_send_rows.fetch_add(delta_rows, 
std::memory_order_relaxed);
-    }
+    void add_shuffle_send_rows(int64_t delta_rows) { shuffle_send_rows += 
delta_rows; }
 
     void add_scan_bytes_from_local_storage(int64_t 
scan_bytes_from_local_storage) {
-        this->_scan_bytes_from_local_storage += scan_bytes_from_local_storage;
+        _scan_bytes_from_local_storage += scan_bytes_from_local_storage;
     }
 
     void add_scan_bytes_from_remote_storage(int64_t 
scan_bytes_from_remote_storage) {
-        this->_scan_bytes_from_remote_storage += 
scan_bytes_from_remote_storage;
+        _scan_bytes_from_remote_storage += scan_bytes_from_remote_storage;
     }
 
-    void add_returned_rows(int64_t num_rows) {
-        this->returned_rows.fetch_add(num_rows, std::memory_order_relaxed);
-    }
+    void add_returned_rows(int64_t num_rows) { returned_rows += num_rows; }
 
     void set_max_peak_memory_bytes(int64_t max_peak_memory_bytes) {
-        this->max_peak_memory_bytes.store(max_peak_memory_bytes, 
std::memory_order_relaxed);
+        max_peak_memory_bytes += max_peak_memory_bytes;

Review Comment:
   max_peak_memory_bytes should be replace ,not add



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