KKcorps commented on code in PR #15563:
URL: https://github.com/apache/pinot/pull/15563#discussion_r2054650757


##########
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:
   When was this observed? IMO, we should fix the logic in KinesisMessageBatch 
that's resulting in this instead of making this change



-- 
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

Reply via email to