dajac commented on a change in pull request #10760: URL: https://github.com/apache/kafka/pull/10760#discussion_r657710021
########## File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java ########## @@ -4298,6 +4296,42 @@ void handleFailure(Throwable throwable) { } } } + + @Override + boolean handleUnsupportedVersionException(UnsupportedVersionException exception) { + + // if no max timestamp requests were submitted we should not retry + if (partitionsToQuery.stream() + .flatMap(t -> t.partitions().stream()) + .noneMatch(p -> p.timestamp() == ListOffsetsRequest.MAX_TIMESTAMP)) + return false; Review comment: As we already iterate over all the partitions below, would it be reasonable to check this there? We could set a boolean flag if there is at least one `MAX_TIMESTAMP`. Also, it would be great if we could add a unit test that covers this case. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org