mattisonchao commented on code in PR #19346:
URL: https://github.com/apache/pulsar/pull/19346#discussion_r1089887068
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1554,13 +1554,13 @@ public void operationComplete(Void v, Stat stat) {
log.debug("[{}] Updating of ledgers list after create
complete. version={}", name, stat);
}
ledgersStat = stat;
- ledgers.put(lh.getId(), newLedger);
- currentLedger = lh;
- currentLedgerEntries = 0;
- currentLedgerSize = 0;
metadataMutex.unlock();
Review Comment:
>This lock is held while the ledgers list or propertiesMap is updated
asynchronously on the metadata store. Since we use the store version, we cannot
have multiple concurrent updates.
Should we move this operation behind the updated memory status?
--
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]