This is an automated email from the ASF dual-hosted git repository.
jt2594838 pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new c7ede27b8da [To dev/1.3] Pipe: Implemented skipReportOnCommit for
PipeRealtimeEvent to avoid premature report for unordered flush (#17561)
(#17620)
c7ede27b8da is described below
commit c7ede27b8da16f86b5f10b96b39527fab6865e95
Author: Caideyipi <[email protected]>
AuthorDate: Sat May 9 10:36:55 2026 +0800
[To dev/1.3] Pipe: Implemented skipReportOnCommit for PipeRealtimeEvent to
avoid premature report for unordered flush (#17561) (#17620)
* Pipe: Removed the failed partial insert from auth check & Implemented
skipReportOnCommit for PipeRealtimeEvent to avoid premature report for
unordered flush (#17561)
* schema
* sptls
* fix
* Update PipeRealtimeEventTest.java
---
.../db/pipe/event/realtime/PipeRealtimeEvent.java | 10 +++
.../iotdb/db/pipe/event/PipeRealtimeEventTest.java | 95 ++++++++++++++++++++++
2 files changed, 105 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEvent.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEvent.java
index c8474e360da..48ab8259fe4 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEvent.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEvent.java
@@ -140,6 +140,16 @@ public class PipeRealtimeEvent extends EnrichedEvent {
return event.getProgressIndex();
}
+ @Override
+ public void skipReportOnCommit() {
+ event.skipReportOnCommit();
+ }
+
+ @Override
+ public boolean isShouldReportOnCommit() {
+ return event.isShouldReportOnCommit();
+ }
+
@Override
public void skipParsingPattern() {
event.skipParsingPattern();
diff --git
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/event/PipeRealtimeEventTest.java
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/event/PipeRealtimeEventTest.java
new file mode 100644
index 00000000000..525951fa4e8
--- /dev/null
+++
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/pipe/event/PipeRealtimeEventTest.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.pipe.event;
+
+import org.apache.iotdb.commons.consensus.index.ProgressIndex;
+import org.apache.iotdb.commons.consensus.index.impl.MinimumProgressIndex;
+import org.apache.iotdb.commons.pipe.agent.task.meta.PipeTaskMeta;
+import org.apache.iotdb.commons.pipe.datastructure.pattern.PipePattern;
+import org.apache.iotdb.commons.pipe.event.EnrichedEvent;
+import org.apache.iotdb.db.pipe.event.realtime.PipeRealtimeEvent;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PipeRealtimeEventTest {
+
+ @Test
+ public void testSkipReportOnCommitIsDelegatedToInnerEvent() {
+ final TestEnrichedEvent innerEvent = new TestEnrichedEvent();
+ final PipeRealtimeEvent realtimeEvent = new PipeRealtimeEvent(innerEvent,
null, null, null);
+
+ Assert.assertTrue(innerEvent.isShouldReportOnCommit());
+ Assert.assertTrue(realtimeEvent.isShouldReportOnCommit());
+
+ realtimeEvent.skipReportOnCommit();
+
+ Assert.assertFalse(innerEvent.isShouldReportOnCommit());
+ Assert.assertFalse(realtimeEvent.isShouldReportOnCommit());
+ }
+
+ private static class TestEnrichedEvent extends EnrichedEvent {
+
+ private TestEnrichedEvent() {
+ super(null, 0, null, null, Long.MIN_VALUE, Long.MAX_VALUE);
+ }
+
+ @Override
+ public boolean internallyIncreaseResourceReferenceCount(final String
holderMessage) {
+ return true;
+ }
+
+ @Override
+ public boolean internallyDecreaseResourceReferenceCount(final String
holderMessage) {
+ return true;
+ }
+
+ @Override
+ public ProgressIndex getProgressIndex() {
+ return MinimumProgressIndex.INSTANCE;
+ }
+
+ @Override
+ public EnrichedEvent shallowCopySelfAndBindPipeTaskMetaForProgressReport(
+ final String pipeName,
+ final long creationTime,
+ final PipeTaskMeta pipeTaskMeta,
+ final PipePattern pattern,
+ final long startTime,
+ final long endTime) {
+ return this;
+ }
+
+ @Override
+ public boolean isGeneratedByPipe() {
+ return false;
+ }
+
+ @Override
+ public boolean mayEventTimeOverlappedWithTimeRange() {
+ return true;
+ }
+
+ @Override
+ public boolean mayEventPathsOverlappedWithPattern() {
+ return true;
+ }
+ }
+}