ZanderXu commented on code in PR #6647:
URL: https://github.com/apache/hadoop/pull/6647#discussion_r1533484754


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -5346,11 +5346,12 @@ NamenodeCommand startCheckpoint(NamenodeRegistration 
backupNode,
   public void processIncrementalBlockReport(final DatanodeID nodeID,
       final StorageReceivedDeletedBlocks srdb)
       throws IOException {
-    writeLock();
+    // Needs the FSWriteLock since it may update quota and access storage 
policyId and full path.

Review Comment:
   Yes. `completeBlock` will updateQuota, so it needs BMWriteLock and 
FSWriteLock.
   
   `processExtraRedundancyBlock` chooses excess replica depends on storage 
policyId, so it needs FSReadLock.
   
   `isInSnapshot` depends on the full path, so it needs FSReadLock.



-- 
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: common-issues-unsubscr...@hadoop.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to