StevenLuMT commented on code in PR #3672:
URL: https://github.com/apache/bookkeeper/pull/3672#discussion_r1038781231


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadOnlyLedgerHandle.java:
##########
@@ -326,11 +326,15 @@ CompletableFuture<Versioned<LedgerMetadata>> 
closeRecovered() {
                     return 
builder.withClosedState().withLastEntryId(lac).withLength(len).build();
                 },
                 this::setLedgerMetadata).run();
-        f.thenRun(() -> {
-                synchronized (metadataLock) {
-                    newEnsemblesFromRecovery.clear();
-                }
-            });
+        f.whenComplete((result, exception) -> {
+            synchronized (metadataLock) {

Review Comment:
   @horizonzy it's ok, 
   I don't think the problem you mentioned has anything to do with this pr?
   I understand this logic is
   when finished to `closeRecovered`, clean up data for 
`newEnsemblesFromRecovery` at the end



-- 
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]

Reply via email to