Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request apache#187 from evans/YBK-161
Browse files Browse the repository at this point in the history
YBK-161: Fixed a few small leaks
  • Loading branch information
Bobby Evans authored and GitHub Enterprise committed Oct 20, 2017
2 parents 74feb75 + 241ac16 commit 821e850
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public void flush() throws IOException {
}

ledgersDb.sync();
key.recycle();
}

public void removeDeletedLedgers() throws IOException {
Expand All @@ -227,13 +228,15 @@ public void removeDeletedLedgers() throws IOException {
long ledgerId = pendingDeletedLedgers.poll();
key.set(ledgerId);
ledgersDb.delete(key.array);
deletedLedgers++;
}

if (log.isDebugEnabled()) {
log.debug("Persisting deletes of ledgers", deletedLedgers);
log.debug("Persisting deletes of ledgers {}", deletedLedgers);
}

ledgersDb.sync();
key.recycle();
}

private static final Logger log = LoggerFactory.getLogger(LedgerMetadataIndex.class);
Expand Down

0 comments on commit 821e850

Please sign in to comment.