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

Aiphago edited comment on HDFS-15382 at 6/3/20, 8:45 AM:
---------------------------------------------------------

!image-2020-06-03-1.png|width=628,height=378!

The simple lock model like this.Parts of implemented as follows
 * As for finalizeReplica(),append(),createRbw()....First get BlockPoolLock 
read lock,and then get BlockPoolLock-volume-lock write lock.
 * As for getStoredBlock(),getMetaDataInputStream()....First get BlockPoolLock 
read lock,and the then get BlockPoolLock-volume-lock read lock.
 * As for deepCopyReplica(),getBlockReports() get the BlockPoolLock read lock.
 * As for delete hold the BlockPoolLock write lock.
 * The change of replicaMap's Gset change to sync to make thread safe.And 
replicaMap itself is the same as HDFS-15180  only control blockpool lock


was (Author: aiphag0):
!image-2020-06-03-1.png|width=628,height=378!

The simple lock model like this.Parts of implemented as follows
 # As for finalizeReplica(),append(),createRbw()....First get BlockPoolLock 
read lock,and then get BlockPoolLock-volume-lock write lock.

 # As for getStoredBlock(),getMetaDataInputStream()....First get BlockPoolLock 
read lock,and the then get BlockPoolLock-volume-lock read lock.

 # As for deepCopyReplica(),getBlockReports() get the BlockPoolLock read lock.

 # As for delete hold the BlockPoolLock write lock.
 # The change of replicaMap's Gset change to sync to make thread safe.And 
replicaMap itself is the same as HDFS-15180  only control blockpool lock

> 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: Aiphago
>            Assignee: Aiphago
>            Priority: Major
>             Fix For: 3.2.1
>
>         Attachments: image-2020-06-02-1.png, image-2020-06-03-1.png
>
>
> 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.3.4#803005)

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

Reply via email to