mumrah commented on code in PR #12250:
URL: https://github.com/apache/kafka/pull/12250#discussion_r892852103
##########
core/src/main/scala/kafka/server/metadata/BrokerMetadataPublisher.scala:
##########
@@ -132,10 +131,7 @@ class BrokerMetadataPublisher(conf: KafkaConfig,
// Publish the new metadata image to the metadata cache.
metadataCache.setImage(newImage)
- val metadataVersionLogMsg = newImage.features().metadataVersion() match {
- case MetadataVersion.UNINITIALIZED => "un-initialized metadata.version"
Review Comment:
The broker remains fenced until it catches up on the metadata log (up to the
high watermark, I believe). The broker components that care about metadata
(which is most of them) have some "initialize" or "startup" method called when
we first publish metadata on a broker. This should mean that when a broker
component is fully started, it will have the current metadata version of the
cluster.
If a metadata version upgrade happened while a broker was initializing, I
think it would either be included in the initial MetadataImage, or it would be
handled separately. Either way, components which use the metadata version need
to cope with the version changing at runtime.
--
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]