[ 
https://issues.apache.org/jira/browse/HDFS-17416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17829441#comment-17829441
 ] 

ASF GitHub Bot commented on HDFS-17416:
---------------------------------------

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


##########
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:
   means both fs and bm locks are needed here?



##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java:
##########
@@ -2150,7 +2155,7 @@ int computeReconstructionWorkForBlocks(
         }
       }
     } finally {
-      namesystem.writeUnlock("computeReconstructionWorkForBlocks");
+      namesystem.writeUnlock(FSNamesystemLockMode.GLOBAL, 
"computeReconstructionWorkForBlocks");

Review Comment:
   Why use the global lock here? Didn't see any operations related to inode.





> [FGL] Monitor threads in BlockManager.class support fine-grained lock
> ---------------------------------------------------------------------
>
>                 Key: HDFS-17416
>                 URL: https://issues.apache.org/jira/browse/HDFS-17416
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>              Labels: pull-request-available
>
> There are some monitor threads in BlockManager.class.
>  
> This ticket is used to make these threads supporting fine-grained locking.
>  * BlockReportProcessingThread
>  * MarkedDeleteBlockScrubber
>  * RedundancyMonitor
>  * Reconstruction Queue Initializer
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to