Hangleton commented on code in PR #13161: URL: https://github.com/apache/kafka/pull/13161#discussion_r1090718859
########## clients/src/main/java/org/apache/kafka/common/internals/KafkaFutureImpl.java: ########## @@ -160,7 +160,7 @@ private void maybeThrowCancellationException(Throwable cause) { * Waits if necessary for this future to complete, and then returns its result. */ @Override - public T get() throws InterruptedException, ExecutionException { + public abstract T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { Review Comment: Thanks for the follow-up. Trying to understand your use case. The `MetadataRequest` used to describe topics timed out. All retries were exhausted (4 lines) and a `TimeoutException` (FQN `org.apache.kafka.common.errors.TimeoutException`) was propagated to the future (that is the future was completed exceptionally), and then propagated to the caller resulting in the behaviour observed. ``` 2022-07-29 13:39:37.854 INFO 25843 --- [348aefeff-admin] org.apache.kafka.clients.NetworkClient : [AdminClient clientId=L.DII.A-b1355e4a-b909-4da1-a832-dd3348aefeff-admin] Disconnecting from node 3 due to request timeout. 2022-07-29 13:39:37.854 INFO 25843 --- [348aefeff-admin] org.apache.kafka.clients.NetworkClient : [AdminClient clientId=L.DII.A-b1355e4a-b909-4da1-a832-dd3348aefeff-admin] Cancelled in-flight METADATA request with correlation id 985 due to node 3 being disconnected (elapsed time since creation: 60023ms, elapsed time since send: 60023ms, request timeout: 30000ms) 2022-07-29 13:39:37.867 ERROR 25843 --- [-StreamThread-1] o.a.k.s.p.i.InternalTopicManager : stream-thread [main] Unexpected error during topic description for L.DII.A-COGROUPKSTREAM-AGGREGATE-STATE-STORE-0000000003-changelog. Error message was: org.apache.kafka.common.errors.TimeoutException: Call(callName=describeTopics, deadlineMs=1659101977830, tries=1, nextAllowedTryMs=1659101977955) timed out at 1659101977855 after 1 attempt(s) 2022-07-29 13:39:37.869 INFO 25843 --- [-StreamThread-1] o.a.k.s.p.internals.StreamThread : stream-thread [L.DII.A-b1355e4a-b909-4da1-a832-dd3348aefeff-StreamThread-1] State transition from RUNNING to PENDING_SHUTDOWN ``` Therefore, it seems that: - The failure of the "describe-topics" invocation was already correctly propagated via the future. - This failure results of the time out of the underlying Metadata request **and** exhaustion of retries. If the broker(s) were only temporarily unavailable, it seems increasing the number of retries may have helped? -- 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