lucasbru commented on PR #22864: URL: https://github.com/apache/kafka/pull/22864#issuecomment-6764402938
This fixes the standby crash, but there’s a second way to kill the state updater thread that this doesn’t cover, and it happens on trunk too: an active task is paused, but its changelogs stay registered and restoring in the reader. The helper only looks at updatingTasks, so it sees “only standbys left” and moves the reader to STANDBY_UPDATING. The next restore() then throws “Should not be in standby updating state if there are still un-completed active changelogs”, because the guard also counts the paused task’s changelogs. I think the guard is too strict, since a paused active task isn’t being restored. Suggestion in StoreChangelogReader: make the restore() guard count only active changelogs whose task is in the tasks map passed in, and in STANDBY_UPDATING also pause the still-restoring active changelogs on the restore consumer so we don’t fetch for paused tasks. About 10 lines, plus a unit test. I tested this together with your change in a randomized fashion (random add/remove/pause/resume of standby and active tasks). Without the reader change, mixed active+standby sequences still crash the thread. With it, none do. Wdyt? -- 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]
