Skip to content

Commit

Permalink
Moved readLedgerMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
shustsud committed Oct 18, 2021
1 parent 5c4652c commit 766eb36
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ private Set<Long> removeOverReplicatedledgers(Set<Long> bkActiveledgers, final G
// this is to reduce the number of lock node creations and deletions in ZK.
// the ensemble check is done again after the lock node is created.
// also, check if the ledger is being replicated already by the replication worker
if (!isNotBookieIncludedInLedgerEnsembles(ledgerManager.readLedgerMetadata(ledgerId).get())
Versioned<LedgerMetadata> preCheckMetadata = ledgerManager.readLedgerMetadata(ledgerId).get();
if (!isNotBookieIncludedInLedgerEnsembles(preCheckMetadata)
|| ZkLedgerUnderreplicationManager.isLedgerBeingReplicated(zk, zkLedgersRootPath, ledgerId)) {
latch.countDown();
continue;
Expand Down

0 comments on commit 766eb36

Please sign in to comment.