gabriellefu opened a new pull request, #22282: URL: https://github.com/apache/kafka/pull/22282
1. Fix TaskManager.handleRevocation to always suspend revoked tasks, even when prepareCommit throws (e.g. TaskMigratedException from producer.send during cache flush). Previously the exception propagated uncaught, skipping the suspend loop entirely. This left tasks in RUNNING state, which caused a downstream IllegalStateException when handleAssignment tried to close them. 2. Wrap prepare/commit/postCommit in try-finally so the suspend loop and task unlock are guaranteed to execute regardless of where an exception occurs. 3. Preserve all exceptions via addSuppressed instead of silently dropping later exceptions. The first exception remains the primary thrown exception for backward compatibility, but subsequent exceptions (e.g. the IllegalStateException from closing an unsuspended task) are now attached as suppressed exceptions instead of lost. -- 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]
