frankvicky commented on code in PR #21080:
URL: https://github.com/apache/kafka/pull/21080#discussion_r3358903352


##########
clients/src/main/java/org/apache/kafka/clients/admin/internals/AdminMetadataManager.java:
##########
@@ -148,6 +149,17 @@ public void rebootstrap(long now) {
             AdminMetadataManager.this.rebootstrap(now);
         }
 
+        @Override
+        public boolean isBootstrapped() {
+            return bootstrapCluster != null;
+        }
+
+        @Override
+        public void bootstrap(List<InetSocketAddress> addresses) {
+            // Called by NetworkClient.ensureBootstrapped() after DNS 
resolution succeeds
+            AdminMetadataManager.this.update(Cluster.bootstrap(addresses), 0);

Review Comment:
   Yes. In `update()`, the now parameter is only used in the else branch to 
update `lastMetadataUpdateMs`, but `Cluster.bootstrap(addresses)` produces a 
cluster where `isBootstrapConfigured()` returns true, so we always take the if 
branch and now is never read.



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