You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "guozhangwang (via GitHub)" <gi...@apache.org> on 2023/02/17 16:48:39 UTC

[GitHub] [kafka] guozhangwang commented on pull request #13270: KAFKA-14729: The kafakConsumer pollForFetches(timer) method takes up a lot of cpu due to the abnormal exit of the heartbeat thread

guozhangwang commented on PR #13270:
URL: https://github.com/apache/kafka/pull/13270#issuecomment-1434906588

   This is an interesting find, thanks @RivenSun2 . In general I think if the background thread dies for whatever the reason we should consider the following actions in precedence:
   
   1) Make sure the consumer now falls into an abnormal state which would not return data, and would not try to tie up the caller thread. This is also for notifying the user.
   
   2) Try to "selfheal" by re-creating the thread (we do not need to do it in this PR, just laying out the ground here), in order to bring the consumer back to normal state.
   
   3) If we cannot selfheal the consumer and it simply becomes useless, let the consumer to throw an exception for any API calls so that the caller thread would then go ahead and recreate a brand new consumer.


-- 
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-unsubscribe@kafka.apache.org

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