You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/07/09 17:11:17 UTC

[GitHub] [kafka] C0urante opened a new pull request #9003: KAFKA-10240: Stop throwing WakeupExceptions during sink task shutdown

C0urante opened a new pull request #9003:
URL: https://github.com/apache/kafka/pull/9003


   A benign `WakeupException` can be thrown by a sink task's consumer if it's scheduled for shutdown by the worker. This is caught and handled gracefully if the exception is thrown when calling `poll` on the consumer, but not if called `commitSync`, which is invoked by a task during shutdown and also when its partition assignment is updated.
   
   If thrown during a partition assignment update, the `WakeupException` is caught and handled gracefully as part of the task's `iteration` loop. If thrown during shutdown, however, it is not caught and instead leads to the scary-looking log message "Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted.".
   
   These changes catch the `WakeupException` during shutdown and handle it gracefully with a `TRACE`-level log message.
   
   A unit test is added to verify this behavior by simulating a thrown `WakeupException` during `Consumer::commitSync`, running through the `WorkerSinkTask::execute` method, and confirming that it does not throw a `WakeupException` itself.
   
   ### 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] C0urante commented on pull request #9003: KAFKA-10240: Stop throwing WakeupExceptions during sink task shutdown

Posted by GitBox <gi...@apache.org>.
C0urante commented on pull request #9003:
URL: https://github.com/apache/kafka/pull/9003#issuecomment-656247517


   @gharris1727 @chia7712 @ncliang would any of you be interested in reviewing this?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] kkonstantine merged pull request #9003: KAFKA-10240: Suppress WakeupExceptions during sink task shutdown

Posted by GitBox <gi...@apache.org>.
kkonstantine merged pull request #9003:
URL: https://github.com/apache/kafka/pull/9003


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] kkonstantine commented on pull request #9003: KAFKA-10240: Stop throwing WakeupExceptions during sink task shutdown

Posted by GitBox <gi...@apache.org>.
kkonstantine commented on pull request #9003:
URL: https://github.com/apache/kafka/pull/9003#issuecomment-657714898


   ok to test


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] kkonstantine commented on pull request #9003: KAFKA-10240: Suppress WakeupExceptions during sink task shutdown

Posted by GitBox <gi...@apache.org>.
kkonstantine commented on pull request #9003:
URL: https://github.com/apache/kafka/pull/9003#issuecomment-657952020


   LGTM


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] C0urante commented on pull request #9003: KAFKA-10240: Suppress WakeupExceptions during sink task shutdown

Posted by GitBox <gi...@apache.org>.
C0urante commented on pull request #9003:
URL: https://github.com/apache/kafka/pull/9003#issuecomment-658280031


   Thanks Konstantine!


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org