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

qinyuren commented on HDFS-13359:
---------------------------------

Hi [~linyiqun], we have a similar problem with version 3.1, but we are not sure 
why Synchronize lock occurs DataXceiver hung. Hope to get your answer.

Thanks you

> DataXceiver hung due to the lock in FsDatasetImpl#getBlockInputStream
> ---------------------------------------------------------------------
>
>                 Key: HDFS-13359
>                 URL: https://issues.apache.org/jira/browse/HDFS-13359
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 2.7.1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Major
>             Fix For: 3.3.0, 3.2.1, 3.1.3
>
>         Attachments: HDFS-13359.001.patch, stack.jpg
>
>
> DataXceiver hung due to the lock that locked by 
>  {{FsDatasetImpl#getBlockInputStream}} (have attached stack).
> {code:java}
>   @Override // FsDatasetSpi
>   public InputStream getBlockInputStream(ExtendedBlock b,
>       long seekOffset) throws IOException {
>     ReplicaInfo info;
>     synchronized(this) {
>       info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock());
>     }
>     ...
>   }
> {code}
> The lock {{synchronized(this)}} used here is expensive, there is already one 
> {{AutoCloseableLock}} type lock defined for {{ReplicaMap}}. We can use it 
> instead.



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