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

[GitHub] [kafka] showuon 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

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

   >  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.
   
   Good suggestion. I was thinking we can directly throw exception in `timeToNextHeartbeat` method when heartbeatThread is failed. That should be good enough. 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: jira-unsubscribe@kafka.apache.org

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