vvcephei commented on a change in pull request #9047: URL: https://github.com/apache/kafka/pull/9047#discussion_r459827952
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStateManagerImpl.java ########## @@ -299,7 +318,17 @@ private void restoreState(final StateRestoreCallback stateRestoreCallback, restoreRecords.add(recordConverter.convert(record)); } } - offset = globalConsumer.position(topicPartition); + try { + offset = globalConsumer.position(topicPartition); + } catch (final TimeoutException error) { + // the `globalConsumer.position()` call should never block, because we know that we did + // a successful `position()` call above for the requested partition and thus the consumer + // should have a valid local position that it can return immediately Review comment: Thanks; yes, this is a very good habit. In this specific case, I wasn't sure what the "bug" would be, though. Just that the implementation of the consumer does something different, but equally correct, from our current understanding of how it works? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org