hfutatzhanghb commented on PR #6509:
URL: https://github.com/apache/hadoop/pull/6509#issuecomment-1914526737

   > 
https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java#L441
   > 
   > ```
   > final long safeLength = getSafeLength(syncBlocks);
   > LOG.debug("Recovering block {}, length={}, safeLength={}, syncList={}", 
block,block.getNumBytes(), safeLength, syncBlocks);
   > ```
   > 
   > if info.getNumBytes==0 ,then safeLength maybe as 0? we can determine that 
if safeLength is 0 can remove this block?
   
   Hi, sir. Thanks for your reviewing. Yes, if info.getNumBytes==0 ,then 
safeLength is 0. I agree with you for using safeLength as the condition because 
it is more readable.


-- 
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