dengziming commented on code in PR #11951:
URL: https://github.com/apache/kafka/pull/11951#discussion_r858760908


##########
core/src/main/scala/kafka/server/BrokerLifecycleManager.scala:
##########
@@ -333,7 +353,11 @@ class BrokerLifecycleManager(val config: KafkaConfig,
   }
 
   private def sendBrokerHeartbeat(): Unit = {
-    val metadataOffset = _highestMetadataOffsetProvider()
+    val metadataOffset = if (readyToUnfence) {

Review Comment:
   Currently, this offset is only used when starting the broker, first to 
ensure the broker has catchup so we can start initialization, second to ensure 
the broker has catchup so we can unfenced, if we use the same metadata offset 
here, it seems unnecessary to ensure twice, but It's indeed peculiar to have an 
offset going back, maybe adding a new field to the `HeartbeatRequest`, or just 
leave it as it is now?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to