StevenLuMT commented on code in PR #3067: URL: https://github.com/apache/bookkeeper/pull/3067#discussion_r930216662
########## bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerFragmentReplicator.java: ########## @@ -133,6 +133,16 @@ public LedgerFragmentReplicator(BookKeeper bkc, ClientConfiguration conf) { private static final Logger LOG = LoggerFactory .getLogger(LedgerFragmentReplicator.class); + private boolean isEntryExpectedOnDeadBookie(final LedgerHandle lh, Long eId, Set<Integer> deadBookieIndex) { + DistributionSchedule.WriteSet writeSet = lh.getWriteSetForReadOperation(eId); Review Comment: The same advice, you needs to recycle writeSet at the end,code like ``` try{ DistributionSchedule.WriteSet writeSet = lh.getWriteSetForReadOperation(eId); for (Integer deadIndex : deadBookieIndex) { if (!writeSet.contains(deadIndex)) { return false; } } } finally { if (writeSet!=null){ writeSet.recycle(); } } ``` -- 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: issues-unsubscr...@bookkeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org