This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 382d35c7e1 [fix](runtime profile) Fix HighWaterMarkCounter update max 
Bug #14769
382d35c7e1 is described below

commit 382d35c7e13edd838e6eecf7fcdddd9e9f17bfe4
Author: Xinyi Zou <zouxiny...@gmail.com>
AuthorDate: Mon Dec 5 18:22:48 2022 +0800

    [fix](runtime profile) Fix HighWaterMarkCounter update max Bug #14769
---
 be/src/util/runtime_profile.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/util/runtime_profile.h b/be/src/util/runtime_profile.h
index 606e127274..c80507110e 100644
--- a/be/src/util/runtime_profile.h
+++ b/be/src/util/runtime_profile.h
@@ -120,9 +120,9 @@ public:
         HighWaterMarkCounter(TUnit::type unit) : Counter(unit), 
current_value_(0) {}
 
         virtual void add(int64_t delta) {
-            int64_t new_val = current_value_.fetch_add(delta, 
std::memory_order_relaxed);
+            current_value_.fetch_add(delta, std::memory_order_relaxed);
             if (delta > 0) {
-                UpdateMax(new_val);
+                UpdateMax(current_value_);
             }
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to