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

justinchen pushed a commit to branch hook-13
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 95abd655245326d56f0b4985d0aac64e9099039d
Author: Caideyipi <[email protected]>
AuthorDate: Wed Mar 25 19:34:22 2026 +0800

    fix-data
---
 .../common/tablet/PipeRawTabletInsertionEvent.java    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeRawTabletInsertionEvent.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeRawTabletInsertionEvent.java
index b72815adf9a..e6e6ef76a15 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeRawTabletInsertionEvent.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeRawTabletInsertionEvent.java
@@ -185,6 +185,12 @@ public class PipeRawTabletInsertionEvent extends 
EnrichedEvent
     return true;
   }
 
+  protected void eliminateProgressIndex() {
+    if (sourceEvent instanceof PipeTsFileInsertionEvent) {
+      ((PipeTsFileInsertionEvent) sourceEvent).eliminateProgressIndex();
+    }
+  }
+
   @Override
   public void bindProgressIndex(final ProgressIndex overridingProgressIndex) {
     // Normally not all events need to report progress, but if the 
overridingProgressIndex
@@ -249,6 +255,14 @@ public class PipeRawTabletInsertionEvent extends 
EnrichedEvent
   }
 
   public void markAsNeedToReport() {
+    if (!needToReport) {
+      addOnCommittedHook(
+          () -> {
+            if (shouldReportOnCommit) {
+              eliminateProgressIndex();
+            }
+          });
+    }
     this.needToReport = true;
     triggerAddHook();
   }
@@ -267,6 +281,11 @@ public class PipeRawTabletInsertionEvent extends 
EnrichedEvent
     return sourceEvent;
   }
 
+  @Override
+  public boolean isShouldReportOnCommit() {
+    return shouldReportOnCommit && needToReport;
+  }
+
   /////////////////////////// TabletInsertionEvent ///////////////////////////
 
   @Override

Reply via email to