SteveYurongSu commented on code in PR #14324:
URL: https://github.com/apache/iotdb/pull/14324#discussion_r1871478889


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/extractor/dataregion/realtime/assigner/PipeDataRegionAssigner.java:
##########
@@ -85,19 +89,44 @@ public void publishToAssign(final PipeRealtimeEvent event) {
       return;
     }
 
-    disruptor.publish(event);
+    final EnrichedEvent innerEvent = event.getEvent();
+    eventCounter.increaseEventCount(innerEvent);
+    if (innerEvent instanceof PipeHeartbeatEvent) {
+      ((PipeHeartbeatEvent) innerEvent).onPublished();
+    }
+
+    if (!disruptor.isClosed()) {
+      disruptor.publish(event);

Review Comment:
   Please add a TODO comment for protential race issues



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to