You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/10/17 15:06:41 UTC
[GitHub] [bookkeeper] hangc0276 commented on a diff in pull request #3541: Auditor publishSuspectedLedgersAsync supports throttle
hangc0276 commented on code in PR #3541:
URL: https://github.com/apache/bookkeeper/pull/3541#discussion_r997181345
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java:
##########
@@ -1224,22 +1224,37 @@ private CompletableFuture<?> publishSuspectedLedgersAsync(Collection<String> mis
LOG.info("Following ledgers: {} of bookie: {} are identified as underreplicated", ledgers, missingBookies);
numUnderReplicatedLedger.registerSuccessfulValue(ledgers.size());
LongAdder underReplicatedSize = new LongAdder();
+
FutureUtils.processList(
Lists.newArrayList(ledgers),
- ledgerId ->
- ledgerManager.readLedgerMetadata(ledgerId).whenComplete((metadata, exception) -> {
+ ledgerId -> {
+ try {
+ openLedgerNoRecoverySemaphore.acquire();
+ } catch (InterruptedException e) {
+ LOG.error("Unable to acquire open ledger operation semaphore ", e);
+ Thread.currentThread().interrupt();
Review Comment:
It won't block the processing stream.
--
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@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org