You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2026/04/15 02:19:21 UTC

(iotdb) branch master updated: Pipe: Fixed the NPE of progress report event (#17474)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 09017af9c5b Pipe: Fixed the NPE of progress report event (#17474)
09017af9c5b is described below

commit 09017af9c5b6d4f175d60716f803870f7f186859
Author: Caideyipi <87...@users.noreply.github.com>
AuthorDate: Wed Apr 15 10:19:14 2026 +0800

    Pipe: Fixed the NPE of progress report event (#17474)
---
 .../source/dataregion/realtime/PipeRealtimeDataRegionSource.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
index 718529243d9..37f1f0a74cb 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java
@@ -431,7 +431,11 @@ public abstract class PipeRealtimeDataRegionSource implements PipeExtractor {
     // Since the batch and retry queue no longer need the heartbeat event to trigger
     // And the progress report event can trigger the processor calculation because it's not reported
     // yet
-    while (((PipeRealtimeEvent) pendingQueue.peekLast()).getEvent() instanceof PipeHeartbeatEvent) {
+    while (true) {
+      final PipeRealtimeEvent lastEvent = ((PipeRealtimeEvent) pendingQueue.peekLast());
+      if (lastEvent == null || !(lastEvent.getEvent() instanceof PipeHeartbeatEvent)) {
+        break;
+      }
       pendingQueue.pollLast();
     }
     if (pendingQueue.peekLast() instanceof ProgressReportEvent) {