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 2022/04/20 21:38:34 UTC

[GitHub] [kafka] cmccabe opened a new pull request, #12075: KAFKA-13841: Fix a case where we were unable to place on fenced brokers in KRaft mode

cmccabe opened a new pull request, #12075:
URL: https://github.com/apache/kafka/pull/12075

   This PR fixes a case where we were unable to place on fenced brokers In KRaft mode. Specifically,
   if we had a broker registration in the metadata log, but no associated heartbeat, previously the
   HeartbeatManager would not track the fenced broker. This PR fixes this by adding this logic to the
   metadata log replay path in ClusterControlManager.


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


[GitHub] [kafka] cmccabe merged pull request #12075: KAFKA-13841: Fix a case where we were unable to place on fenced brokers in KRaft mode

Posted by GitBox <gi...@apache.org>.
cmccabe merged PR #12075:
URL: https://github.com/apache/kafka/pull/12075


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


[GitHub] [kafka] cmccabe commented on pull request #12075: KAFKA-13841: Fix a case where we were unable to place on fenced brokers in KRaft mode

Posted by GitBox <gi...@apache.org>.
cmccabe commented on PR #12075:
URL: https://github.com/apache/kafka/pull/12075#issuecomment-1105753323

   @dengziming : I think the most common scenario where this might happen is after the cluster first starts up, and we have some existing broker registrations. In that case, currently those will never get added to `HeartbeatManager` unless they send at least one heartbeat. That's what we want to fix here.


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


[GitHub] [kafka] dengziming commented on a diff in pull request #12075: KAFKA-13841: Fix a case where we were unable to place on fenced brokers in KRaft mode

Posted by GitBox <gi...@apache.org>.
dengziming commented on code in PR #12075:
URL: https://github.com/apache/kafka/pull/12075#discussion_r854990032


##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -334,11 +334,7 @@ public ControllerResult<BrokerRegistrationReply> registerBroker(
                 setMaxSupportedVersion(feature.maxSupportedVersion()));
         }
 
-        if (existing == null) {

Review Comment:
   nit: If existing is not used here, we can remove `existing = null` at line 305



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


[GitHub] [kafka] cmccabe commented on pull request #12075: KAFKA-13841: Fix a case where we were unable to place on fenced brokers in KRaft mode

Posted by GitBox <gi...@apache.org>.
cmccabe commented on PR #12075:
URL: https://github.com/apache/kafka/pull/12075#issuecomment-1105800086

   > I sort of wonder if there might be other cases lurking where BrokerHeartbeatManager view of the brokers gets out of sync of the broker registrations in ClusterControlManager?
   
   It's a good question. The difficult thing here is that the heartbeat manager's state is actually NOT in the metadata log, unlike every other component of QuorumController. It's soft state, stored in memory on the active controller only. We tried to make it as clear as possible by making the HeartbeatManager null on the standby controllers, and only present on the active controller. But there are still corner cases. Hopefully this is the last one.


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