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

rong pushed a commit to branch rc/1.3.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rc/1.3.3 by this push:
     new 41d0604e38e Pipe: fix event counter decrement operations to avoid 
inconsistent final counts (#13533)
41d0604e38e is described below

commit 41d0604e38e16348a2af3ff796b20b854101de70
Author: V_Galaxy <[email protected]>
AuthorDate: Wed Sep 18 15:08:27 2024 +0800

    Pipe: fix event counter decrement operations to avoid inconsistent final 
counts (#13533)
---
 .../org/apache/iotdb/db/pipe/metric/PipeDataRegionEventCounter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/PipeDataRegionEventCounter.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/PipeDataRegionEventCounter.java
index b1405628f37..bf95a9868cc 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/PipeDataRegionEventCounter.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/PipeDataRegionEventCounter.java
@@ -76,11 +76,11 @@ public class PipeDataRegionEventCounter extends 
PipeEventCounter {
       return;
     }
     if (event instanceof PipeHeartbeatEvent) {
-      pipeHeartbeatEventCount.getAndUpdate(count -> count > 0 ? count - 1 : 0);
+      pipeHeartbeatEventCount.decrementAndGet();
     } else if (event instanceof TabletInsertionEvent) {
-      tabletInsertionEventCount.getAndUpdate(count -> count > 0 ? count - 1 : 
0);
+      tabletInsertionEventCount.decrementAndGet();
     } else if (event instanceof TsFileInsertionEvent) {
-      tsFileInsertionEventCount.getAndUpdate(count -> count > 0 ? count - 1 : 
0);
+      tsFileInsertionEventCount.decrementAndGet();
     }
   }
 

Reply via email to