[ https://issues.apache.org/jira/browse/HDFS-15382?focusedWorklogId=730837&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-730837 ]
ASF GitHub Bot logged work on HDFS-15382: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Feb/22 12:03 Start Date: 22/Feb/22 12:03 Worklog Time Spent: 10m Work Description: tomscut commented on a change in pull request #3941: URL: https://github.com/apache/hadoop/pull/3941#discussion_r811864144 ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java ########## @@ -1850,7 +1828,8 @@ public ReplicaHandler createTemporary(StorageType storageType, ReplicaInfo lastFoundReplicaInfo = null; boolean isInPipeline = false; do { - try (AutoCloseableLock lock = datasetWriteLock.acquire()) { + try (AutoCloseableLock lock = lockManager.readLock(LockLevel.BLOCK_POOl, Review comment: Here write lock is changed to read lock, is there any problem? ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaMap.java ########## @@ -184,7 +203,7 @@ void mergeAll(ReplicaMap other) { ReplicaInfo remove(String bpid, Block block) { checkBlockPool(bpid); checkBlock(block); - try (AutoCloseableLock l = writeLock.acquire()) { + try (AutoCloseDataSetLock l = lockManager.readLock(LockLevel.BLOCK_POOl, bpid)) { Review comment: I agree with @Hexiaoqiao . We should keep the read/write lock. Once `block Pool lock` is introduced, we can discuss whether `write locks` need to be changed to `read locks` in other JIRA. -- 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 Issue Time Tracking ------------------- Worklog Id: (was: 730837) Time Spent: 2h (was: 1h 50m) > Split FsDatasetImpl from blockpool lock to blockpool volume lock > ----------------------------------------------------------------- > > Key: HDFS-15382 > URL: https://issues.apache.org/jira/browse/HDFS-15382 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Mingxiang Li > Assignee: Mingxiang Li > Priority: Major > Labels: pull-request-available > Attachments: HDFS-15382-sample.patch, image-2020-06-02-1.png, > image-2020-06-03-1.png > > Time Spent: 2h > Remaining Estimate: 0h > > In HDFS-15180 we split lock to blockpool grain size.But when one volume is in > heavy load and will block other request which in same blockpool but different > volume.So we split lock to two leval to avoid this happend.And to improve > datanode performance. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org