You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/13 15:06:46 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16389: [improve][broker] Create the cursor ledger lazily to improve the subscribe performance

codelipenghui commented on code in PR #16389:
URL: https://github.com/apache/pulsar/pull/16389#discussion_r920194365


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -647,18 +647,7 @@ void initialize(PositionImpl position, Map<String, Long> properties, Map<String,
                     ledger.getName(), name, messagesConsumedCounter, markDeletePosition, readPosition);
         }
 
-        createNewMetadataLedger(new VoidCallback() {
-            @Override
-            public void operationComplete() {
-                STATE_UPDATER.set(ManagedCursorImpl.this, State.Open);
-                callback.operationComplete();
-            }
-
-            @Override
-            public void operationFailed(ManagedLedgerException exception) {
-                callback.operationFailed(exception);
-            }
-        });
+        callback.operationComplete();

Review Comment:
   Yes, correct. I have changed to persistPositionMetaStore().



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