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


##########
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:
   There is one thing I care about:
   Shall we clear `newEnsemblesFromRecovery` when the metadata update fails? 
   Line_314 support `newEnsemblesFromRecovery` to do some work. If we clear it, 
is there some influence for it?



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