guozhangwang commented on a change in pull request #8964: URL: https://github.com/apache/kafka/pull/8964#discussion_r466103277
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java ########## @@ -428,53 +428,28 @@ public void resume() { return committableOffsets; } - /** - * This should only be called if the attempted commit succeeded for this task - */ @Override - public void postCommit() { - commitRequested = false; - + public void postCommit(final boolean enforceCheckpoint) { switch (state()) { case CREATED: // We should never write a checkpoint for a CREATED task as we may overwrite an existing checkpoint // with empty uninitialized offsets - log.debug("Skipped writing checkpoint for created task"); + log.debug("Skipped writing checkpoint for {} task", state()); break; case RESTORING: - writeCheckpoint(); - log.debug("Finalized commit for restoring task"); + case SUSPENDED: Review comment: Seems IDEA liked it the other way (it auto merges these two cases). ---------------------------------------------------------------- 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