mjsax commented on code in PR #19188:
URL: https://github.com/apache/kafka/pull/19188#discussion_r1990327423


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateManagerImpl.java:
##########
@@ -341,7 +341,7 @@ private void reprocessState(final List<TopicPartition> 
topicPartitions,
 
                 offset = getGlobalConsumerOffset(topicPartition);
 
-                stateRestoreListener.onBatchRestored(topicPartition, 
storeName, offset, restoreCount);
+                stateRestoreListener.onBatchRestored(topicPartition, 
storeName, offset, records.count());

Review Comment:
   I don't think this is the right fix. Note, that we check for `record.key != 
null` -- so I think we need to add a second counter for the for-loop to only 
count how many record got effectively restored? Cf `restoreState` method below.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to