apoorvmittal10 commented on code in PR #17772:
URL: https://github.com/apache/kafka/pull/17772#discussion_r1837822758
##########
share/src/main/java/org/apache/kafka/server/share/persister/DefaultStatePersister.java:
##########
@@ -211,7 +228,8 @@ private ReadShareGroupStateResult readResponsesToResult(
int partition = partitionFuture.getKey();
CompletableFuture<ReadShareGroupStateResponse> future
= partitionFuture.getValue();
try {
- ReadShareGroupStateResponse partitionResponse =
future.get();
+ // already completed because of allOf call in the
caller
+ ReadShareGroupStateResponse partitionResponse =
future.get(0, TimeUnit.MILLISECONDS);
Review Comment:
> allOff returns a future which will be completed when all underlying
futures complete
Make sense then will it be better to just use `join()`? You won't need
checked exceptions then rather unwrapping the CompletionException. As anyways
the futures are completed. I leave it on you to decide.
--
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]