sodonnel commented on PR #4943:
URL: https://github.com/apache/hadoop/pull/4943#issuecomment-1260617216

   Thanks for pinging me on this. I don't think this change is needed from that 
method. This is the call made to `isBlockReplicatedOK()`:
   
   ```
   if (!isBlockReplicatedOk(dn, b, false, null)) {
                 blockList.put(b, null);
               }
   ```
   
   Note the 3rd parameter is `false` (scheduleReconStruction), which means it 
will not schedule replication:
   
   ```
      if (neededReconstruction && scheduleReconStruction) {
         if (!blockManager.neededReconstruction.contains(block) &&
             blockManager.pendingReconstruction.getNumReplicas(block) == 0 &&
             blockManager.isPopulatingReplQueues()) {
           // Process these blocks only when active NN is out of safe mode.
           blockManager.neededReconstruction.add(block,
               liveReplicas, num.readOnlyReplicas(),
               num.outOfServiceReplicas(),
               blockManager.getExpectedRedundancyNum(block));
         }
       }
   ```
   
   There are other places in the code where scheduleReconStruction is passed as 
true, but we do seem to take the write lock in those cases as needed.
   
   Did you see some problem you think this is causing, or did you simply spot 
it during review?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to