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

Commit

Permalink
YBK-161: Fixed a few small leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Evans committed Oct 19, 2017
1 parent 74feb75 commit 241ac16
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 241ac16

Please sign in to comment.