KKcorps commented on code in PR #15563: URL: https://github.com/apache/pinot/pull/15563#discussion_r2059575135
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java: ########## @@ -475,7 +475,10 @@ protected boolean consumeLoop() messageBatch.getMessageCount(), messageBatch.getUnfilteredMessageCount(), messageBatch.isEndOfPartitionGroup()); } - _endOfPartitionGroup = messageBatch.isEndOfPartitionGroup(); + // We need to check for both endOfPartitionGroup and messageCount == 0, because + // endOfPartitionGroup can be true even if this is the last batch of messages (has been observed for kinesis) + // To process the last batch of messages, we need to set _endOfPartitionGroup to false in such a case + _endOfPartitionGroup = messageBatch.getMessageCount() == 0 && messageBatch.isEndOfPartitionGroup(); Review Comment: Got it. Then this makes sense. We can have the additional check for messages == 0 as well -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org