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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]