ableegoldman commented on a change in pull request #10788: URL: https://github.com/apache/kafka/pull/10788#discussion_r683095231
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java ########## @@ -867,6 +873,36 @@ private void initializeAndRestorePhase() { log.debug("Idempotent restore call done. Thread state has not changed."); } + private void handleTopologyUpdatesPhase() { + // Check if the topology has been updated since we last checked, ie via #addNamedTopology or #removeNamedTopology + // or if this is the very first topology in which case we may need to wait for it to be non-empty + if (lastSeenTopologyVersion < topologyMetadata.topologyVersion() || lastSeenTopologyVersion == 0) { + try { Review comment: I refactored this part of the code quite a bit, let me know if you have any remaining concerns with the new logic -- 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