mumrah commented on a change in pull request #11677:
URL: https://github.com/apache/kafka/pull/11677#discussion_r796836599



##########
File path: 
core/src/main/scala/kafka/server/metadata/BrokerMetadataListener.scala
##########
@@ -73,7 +74,7 @@ class BrokerMetadataListener(
   /**
    * The current metadata delta. Accessed only from the event queue thread.
    */
-  private var _delta = new MetadataDelta(_image)
+  private var _delta = new MetadataDelta(_image, metadataVersionProvider)

Review comment:
       The idea with this provider thing was to have an object accessible 
outside of the metadata update path that could be used to get the current 
metadata version. Replica fetchers was one consideration. These will need to 
get the current metadata.version when deciding which RPC to use (that is, until 
we switch them over to using ApiVersions). However, I suppose ReplicaManager 
can push the current metadata.version up to ReplicaFetcherManager as updates 
are processed. 
   
   Come to think of it, It's probably safer that we _don't_ have some 
out-of-band way to access the metadata.version and instead force components to 
use MetadataImage (or subscribe to metadata updates themselves). I'll back out 
this code.




-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to