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

   > Contributor
   
   Hi, sir. IIUC, it is safe.
   The reason is as below, original code is :
   ```java
         ExtendedBlock newBlock = new ExtendedBlock(bpid, block.getBlockId(),
             safeLength, recoveryId);
         DatanodeProtocolClientSideTranslatorPB nn = 
getActiveNamenodeForBP(bpid);
   
         nn.commitBlockSynchronization(block, newBlock.getGenerationStamp(),
             newBlock.getNumBytes(), true, false, newLocs, newStorages);
   ```
   We initialize an ExtendedBlock object named newBlock with safeLength equals 
to 0, then passing `newBlock.getNumBytes()` to method 
commitBlockSynchronization which means newlength.


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