You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "poorbarcode (via GitHub)" <gi...@apache.org> on 2023/08/04 06:46:33 UTC

[GitHub] [pulsar] poorbarcode commented on a diff in pull request #20814: [fix][ml] fix potential data lose when enable lazy cursor recovery

poorbarcode commented on code in PR #20814:
URL: https://github.com/apache/pulsar/pull/20814#discussion_r1284042024


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -190,6 +190,11 @@ public class ManagedLedgerImpl implements ManagedLedger, CreateCallback {
     @SuppressWarnings("unused")
     private volatile long totalSize = 0;
 
+    static final AtomicLongFieldUpdater<ManagedLedgerImpl> LAZY_RECOVERY_IN_PROCESS = AtomicLongFieldUpdater
+            .newUpdater(ManagedLedgerImpl.class, "lazyRecoveryInProcess");
+    @SuppressWarnings("unused")
+    private volatile long lazyRecoveryInProcess = 0;

Review Comment:
   Since the variable `uninitializedCursors` is tracing the cursor, which is in initialize progress. I think the new variable `lazyRecoveryInProcess` is not needed.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org