lucasbru opened a new pull request, #24217:
URL: https://github.com/apache/kafka/pull/24217

   Backport of #22864 (KAFKA-20731) to 4.4.
   
   `DefaultStateUpdater` could call the non-idempotent 
`ChangelogReader#transitToUpdateStandby` while the changelog reader was already 
in `STANDBY_UPDATING`, which throws an `IllegalStateException` and terminates 
the state updater thread. The fix centralizes the changelog reader state 
transitions in `DefaultStateUpdater` so the reader is only moved to 
`STANDBY_UPDATING` while it is restoring active tasks, and returns to 
`ACTIVE_RESTORING` when no tasks are updating. `StoreChangelogReader` now also 
pauses and skips changelogs retained by paused active tasks.
   
   The cherry-pick had one conflict in the pause path of `DefaultStateUpdater`, 
because this branch does not have the `tasksAndActionsLock` wrapper from trunk. 
I kept the branch's existing code there and only replaced the old transition 
call with `maybeTransitionChangelogReader()`.
   


-- 
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]

Reply via email to