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/12/20 19:31:08 UTC

[GitHub] [kafka] mumrah opened a new pull request, #13027: MINOR Send ZK broker epoch in registration

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

   Rather than a boolean `isMigratingZkBroker`, this patch includes the broker epoch. The broker epoch, as it exists in ZK, is needed to construct valid UpdateMetadataRequests.
   
   The logic for determining if a registered broker is a ZK broker remains the same. Instead of checking for the boolean, we check for a non-default value.


-- 
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] mumrah commented on pull request #13027: MINOR Send ZK broker epoch in registration

Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah commented on PR #13027:
URL: https://github.com/apache/kafka/pull/13027#issuecomment-1529838802

   Closing this old PR. We ended up going back to the boolean field for IsMigratingZkBroker


-- 
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] akhileshchg commented on a diff in pull request #13027: MINOR Send ZK broker epoch in registration

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


##########
core/src/main/scala/kafka/server/KafkaServer.scala:
##########
@@ -359,6 +354,11 @@ class KafkaServer(
         val brokerInfo = createBrokerInfo
         val brokerEpoch = zkClient.registerBroker(brokerInfo)
 
+        lifecycleManager = new BrokerLifecycleManager(config,
+          time,
+          threadNamePrefix,
+          zkBrokerEpoch = Some(brokerEpoch))

Review Comment:
   Won't this value change every while the broker is alive? I mean won't the broker be able to re-register/establish new session with Zookeeper after losing it?



-- 
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] mumrah closed pull request #13027: MINOR Send ZK broker epoch in registration

Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah closed pull request #13027: MINOR Send ZK broker epoch in registration
URL: https://github.com/apache/kafka/pull/13027


-- 
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] mumrah commented on a diff in pull request #13027: MINOR Send ZK broker epoch in registration

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


##########
core/src/main/scala/kafka/server/KafkaServer.scala:
##########
@@ -359,6 +354,11 @@ class KafkaServer(
         val brokerInfo = createBrokerInfo
         val brokerEpoch = zkClient.registerBroker(brokerInfo)
 
+        lifecycleManager = new BrokerLifecycleManager(config,
+          time,
+          threadNamePrefix,
+          zkBrokerEpoch = Some(brokerEpoch))

Review Comment:
   Good catch. We do get new broker epochs after Zk session re-initializes. I'll change this to use the same pattern we use in AlterPartitionManager



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