lucasbru opened a new pull request, #14869: URL: https://github.com/apache/kafka/pull/14869
…IntegrationTest The following race can happen in the state updater code path - Task is restoring, owned by state updater - We fall out of the consumer group, lose all partitions - We therefore register a "TaskManager.pendingUpdateAction", to CLOSE_DIRTY - We also register a "StateUpdater.taskAndAction" to remove the task - We get the same task reassigned. Since it's still owned by the state updater, we don't do much - The task completes restoration - The "StateUpdater.taskAndAction" to remove will be ignored, since it's already restored - Inside "handleRestoredTasksFromStateUpdater", we close the task dirty because of the pending update action - We now have the task assigned, but it's closed. To fix this particular race, we cancel the "close" pending update action. Also, it seems we do not need to close dirty here, it's enough to close clean when we lose the task. This should fix the flaky EOSIntegrationTest. *More detailed description of your change, if necessary. The PR title and PR message become the squashed commit message, so use a separate comment to ping reviewers.* *Summary of testing strategy (including rationale) for the feature or bug fix. Unit and/or integration tests are expected for any behaviour change and system tests should be considered for larger changes.* ### 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org