bkActiveLedgersSnapshot.remove(bkLid);
garbageCleaner.clean(bkLid);
}
}
while(ledgerRangeIterator.hasNext()) {
LedgerRange lRange = ledgerRangeIterator.next();
Map<Long, Boolean> subBkActiveLedgers = null;
Long start = lRange.start();
Long end = lRange.end();
if (end != LedgerRange.NOLIMIT) {
subBkActiveLedgers = bkActiveLedgersSnapshot.subMap(start,
true, end, true);
} else {
if (start != LedgerRange.NOLIMIT) {
subBkActiveLedgers = bkActiveLedgersSnapshot.tailMap(start);
} else {
subBkActiveLedgers = bkActiveLedgersSnapshot;
}
}
Set<Long> globalActiveLedgers = lRange.getLedgers();
LOG.debug("All active ledgers for hash node {}, Current active ledgers from Bookie for hash node {}",
globalActiveLedgers, subBkActiveLedgers.keySet());
for (Long bkLid : subBkActiveLedgers.keySet()) {
if (!globalActiveLedgers.contains(bkLid)) {
// remove it from current active ledger