eolivelli commented on code in PR #3548:
URL: https://github.com/apache/bookkeeper/pull/3548#discussion_r1012641746
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java:
##########
@@ -112,12 +112,10 @@ public void initiate() {
* Asynchronously read the ledger metadata node.
*/
bk.getLedgerManager().readLedgerMetadata(ledgerId)
- .whenComplete((metadata, exception) -> {
- if (exception != null) {
- openComplete(BKException.getExceptionCode(exception),
null);
- } else {
- openWithMetadata(metadata);
- }
+ .thenAcceptAsync(this::openWithMetadata,
bk.getScheduler().chooseThread(ledgerId))
+ .exceptionally(exception -> {
+ openComplete(BKException.getExceptionCode(exception),
null);
Review Comment:
So when the BK closed the treadpool is shutdown and the callback isn't
executed.
This looks like a problem that can happen on every callback.
Let's keep this patch as it is here but please open a ticket to track this
bad problem.
If the BK client is closed then probably the application is shutting down
and it is a critical point in the life cycle
--
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]