FrankYang0529 commented on code in PR #22083:
URL: https://github.com/apache/kafka/pull/22083#discussion_r3630416755


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/ProducerMetadata.java:
##########
@@ -138,14 +136,19 @@ public synchronized boolean retainTopic(String topic, 
boolean isInternal, long n
     /**
      * Wait for metadata update until the current version is larger than the 
last version we know of
      */
-    public synchronized void awaitUpdate(final int lastVersion, final long 
timeoutMs) throws InterruptedException {
-        long currentTimeMs = time.milliseconds();
-        long deadlineMs = currentTimeMs + timeoutMs < 0 ? Long.MAX_VALUE : 
currentTimeMs + timeoutMs;
-        time.waitObject(this, () -> {

Review Comment:
   Agree, added a default implementation to `Time#waitObject`.



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