SteveYurongSu commented on code in PR #15307:
URL: https://github.com/apache/iotdb/pull/15307#discussion_r2036423212
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java:
##########
@@ -311,6 +313,29 @@ public void prefetchEvent(@NonNull final SubscriptionEvent
thisEvent) {
prefetchingQueue.add(thisEvent);
}
+ private synchronized void peekOnce() {
+ final Event peekedEvent =
UserDefinedEnrichedEvent.maybeOf(inputPendingQueue.peek());
+ if (Objects.isNull(peekedEvent)) {
+ return;
+ }
+
+ if (!(peekedEvent instanceof PipeHeartbeatEvent)) {
+ return;
+ }
+
+ final Event polledEvent = inputPendingQueue.waitedPoll();
+ if (!Objects.equals(peekedEvent, polledEvent)) {
+ LOGGER.warn(
+ "Subscription: inconsistent heartbeat event when {} peeking (broken
invariant), expected {}, actual {}, do nothing",
+ this,
+ peekedEvent,
+ polledEvent);
Review Comment:
Not enough?
--
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]