jugomezv commented on code in PR #10418:
URL: https://github.com/apache/pinot/pull/10418#discussion_r1149820316


##########
pinot-spi/src/main/java/org/apache/pinot/spi/stream/MessageBatch.java:
##########
@@ -116,4 +116,14 @@ default StreamPartitionMsgOffset getOffsetOfNextBatch() {
   default boolean isEndOfPartitionGroup() {
     return false;
   }
+
+  /**
+   * This is useful while determining ingestion delay for a message batch. 
Retaining metadata for last message in
+   * a batch can enable us to estimate the ingestion delay for the batch.
+   *
+   * @return null by default.
+   */
+  default public StreamMessageMetadata getLastMessageMetadata() {

Review Comment:
   Ack to nullable.
   
   I think the second suggestion in this comment may lead to trouble: the last 
index may not be the message that provided the last metadata: it depends on 
errors etc and the external code already did the filtering for us so I don't 
want to have to redo that logic here. 



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