zymap commented on code in PR #4045:
URL: https://github.com/apache/bookkeeper/pull/4045#discussion_r1289440098
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/SanityTestCommand.java:
##########
@@ -134,8 +134,7 @@ public static CompletableFuture<Boolean>
handleAsync(ServerConfiguration conf, S
}
CompletableFuture<LedgerHandle> lhFuture = new
CompletableFuture<>();
CompletableFuture<Void> readEntryFuture = new
CompletableFuture<>();
-
- FutureUtils.collect(entriesFutures).thenCompose(_r -> {
+ FutureUtils.collect(entriesFutures).thenCompose(_r ->
lh.closeAsync()).thenCompose(_r -> {
Review Comment:
It seems the `lh` still in use at the next CompletionStage. Why close it
here? It will close at the end.
```
lhFuture.complete(lh);
}, null);
return lhFuture;
}).thenCompose(rlh -> {
```
--
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]