poorbarcode commented on code in PR #20935:
URL: https://github.com/apache/pulsar/pull/20935#discussion_r1287141060
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2151,7 +2151,13 @@ public void operationFailed(ManagedLedgerException
exception) {
mdEntry.triggerFailed(exception);
}
- });
+ };
+
+ if (directPersistMetadataStore) {
+ persistPositionMetaStore(mdEntry, cb);
+ } else {
+ persistPositionToLedger(cursorLedger, mdEntry, cb);
+ }
Review Comment:
Good suggestion.
I have changed the check before `persistPositionToLedger` is executed,
which can avoid building the unnecessary `PositionInfo` object. see
https://github.com/apache/pulsar/pull/20935/files#diff-fad355f91bd15cc041161f9a46fce62b7fee87fbfb8f0ff8a8b724a1bd1f29eeR2156
--
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]