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/28 04:32:35 UTC

[GitHub] [kafka] showuon commented on a diff in 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 code in PR #13270:
URL: https://github.com/apache/kafka/pull/13270#discussion_r1119559892


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java:
##########
@@ -355,6 +355,12 @@ protected synchronized long timeToNextHeartbeat(long now) {
         // we don't need to send heartbeats
         if (state.hasNotJoinedGroup())
             return Long.MAX_VALUE;
+        if (heartbeatThread != null) {

Review Comment:
   > We could 1 line it ya?
   if (heartbeatThread != null && heartbeatThread.hasFailed()) {
   ...
   }
   
   
   Could you address this comment?
   



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