You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/07/26 17:03:57 UTC

[GitHub] [bookkeeper] StevenLuMT commented on a diff in pull request #3067: Recover only those entries which as supposed to be on dead bookie

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;
               }
         }
         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-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org