You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "horizonzy (via GitHub)" <gi...@apache.org> on 2023/09/11 10:37:20 UTC
[GitHub] [pulsar] horizonzy commented on a diff in pull request #21159: [fix] [auto-recovery] Fix metadata store deadlock due to BookkeeperInternalCallbacks.Processor
horizonzy commented on code in PR #21159:
URL: https://github.com/apache/pulsar/pull/21159#discussion_r1321342770
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/bookkeeper/AbstractHierarchicalLedgerManager.java:
##########
@@ -206,10 +206,11 @@ protected void asyncProcessLedgersInSingleNode(
mcb = new BookkeeperInternalCallbacks.MultiCallback(activeLedgers.size(), finalCb, ctx,
successRc, failureRc);
// start loop over all ledgers
- for (Long ledger : activeLedgers) {
- processor.process(ledger, mcb);
- }
-
+ scheduler.submit(() -> {
Review Comment:
I think making `processor.process` in the scheduler is good enough, the processor is not under-controlled. If there are no activeLedgers, no need to switch thread.
--
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