guozhangwang opened a new pull request #9464: URL: https://github.com/apache/kafka/pull/9464
Today for active tasks we the following active task suspension: 1) closeAndRevive in handleTaskCorruption. 2) closeClean in assignor#onAssignment. 3) closeClean in shutdown. 4) closeDirty in assignor#onAssignment. 5) closeDirty in listener#onPartitionsLost. 6) closeDirty in shutdown. 7) suspend in listener#onPartitionsRevoked. Among those, 1/4/5/6 do not call prepareCommit which would `stateManager#flushCache` and may cause illegal state manager. This PR would require a prepareCommit triggered before suspend. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- 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