guozhangwang commented on PR #13523: URL: https://github.com/apache/kafka/pull/13523#issuecomment-1499854043
While working on fixing the follow-ups I found a somewhat tricky issue with pausing tasks, related to state transitions: previously we only transit to `RUNNING` state when all tasks, no matter if they are paused or resumed, have finished restoration. This transition requirement is not strict with state-updater today, e.g. if a task was paused at the very beginning, like what we did in `PauseResumeIntegrationTest` where we call `streams.pause()` and then `streams.start()`, then the state updater would not try to restore those received tasks, while it would report it has no active tasks undergoing restoration for the moment (since those tasks are paused) to the main thread, which would take it as a signal to transit to `RUNNING`. Without the state-updater though, the main thread would not transit to `RUNNING` if user calls ``` kafkaStreams.pause(); kafkaStreams.start(); ``` Since they would need to see those tasks, though paused, to complete restoration still. Previously those tests do not fail because of the bug I'm actually fixing here, and now with the fix in place, those tests would not pass since they would never see the state transiting to `RUNNING` when `enableStateUpdater` is false. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
