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/23 23:33:56 UTC

[GitHub] [kafka] guozhangwang opened a new pull request #9068: MINOR: INFO log4j when request re-join

guozhangwang opened a new pull request #9068:
URL: https://github.com/apache/kafka/pull/9068


   While debugging a rebalance scenario I found that inside rejoinNeededOrPending when we trigger rebalance due to metadata or subscription changes it is not logged, and hence it's actually a bit tricky to find out the reason of the triggered rebalance. I'm adding two INFO log4j entries to fill in the gap.
   
   Other requestRejoin() calls are already covered.
   
   ### 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] guozhangwang merged pull request #9068: MINOR: INFO log4j when request re-join

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


   


----------------------------------------------------------------
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] guozhangwang commented on pull request #9068: MINOR: INFO log4j when request re-join

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


   @vvcephei @abbccdda 


----------------------------------------------------------------
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] guozhangwang commented on pull request #9068: MINOR: INFO log4j when request re-join

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


   test 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] abbccdda commented on a change in pull request #9068: MINOR: INFO log4j when request re-join

Posted by GitBox <gi...@apache.org>.
abbccdda commented on a change in pull request #9068:
URL: https://github.com/apache/kafka/pull/9068#discussion_r460368003



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
##########
@@ -770,12 +770,18 @@ public boolean rejoinNeededOrPending() {
         // we need to rejoin if we performed the assignment and metadata has changed;
         // also for those owned-but-no-longer-existed partitions we should drop them as lost
         if (assignmentSnapshot != null && !assignmentSnapshot.matches(metadataSnapshot)) {
+            log.info("Requesting to re-join the group and trigger rebalance since the assignment metadata has changed from {} to {}",
+                    assignmentSnapshot, metadataSnapshot);
+
             requestRejoin();
             return true;
         }
 
         // we need to join if our subscription has changed since the last join
         if (joinedSubscription != null && !joinedSubscription.equals(subscriptions.subscription())) {
+            log.info("Requesting to re-join the group and trigger rebalance since the subscription has changed from {} to {}",
+                    joinedSubscription, subscriptions.subscription());

Review comment:
       nit: fix alignment.




----------------------------------------------------------------
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] guozhangwang commented on pull request #9068: MINOR: INFO log4j when request re-join

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


   test 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