guozhangwang commented on a change in pull request #9083: URL: https://github.com/apache/kafka/pull/9083#discussion_r491647837
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorNode.java ########## @@ -118,6 +120,10 @@ public void init(final InternalProcessorContext context) { } catch (final Exception e) { throw new StreamsException(String.format("failed to initialize processor %s", name), e); } + + // revived tasks could re-initialize the topology, + // in which case we should reset the flag + closed = false; Review comment: SG. ########## File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamTaskTest.java ########## @@ -1310,9 +1310,11 @@ public void shouldNotCheckpointOffsetsAgainOnCommitIfSnapshotNotChangedMuch() { EasyMock.expect(recordCollector.offsets()).andReturn(Collections.singletonMap(changelogPartition, offset)).anyTimes(); stateManager.checkpoint(); EasyMock.expectLastCall().once(); + EasyMock.expect(stateManager.changelogPartitions()).andReturn(Collections.singleton(changelogPartition)); Review comment: My bad, will revert. ---------------------------------------------------------------- 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