hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-13359) DataXceiver hungs due to the lock in FsDatasetImpl#getBlockInputStream
Date Wed, 28 Mar 2018 09:02:00 GMT

     [ https://issues.apache.org/jira/browse/HDFS-13359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yiqun Lin updated HDFS-13359:
-----------------------------
    Status: Patch Available  (was: Open)

Patch attached. Just use {{datasetLock}} to replace the {{synchronized}} lock.

> DataXceiver hungs 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: 3.0.0
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Major
>         Attachments: HDFS-13359.001.patch
>
>
> DataXceiver hungs due to the lock that locked by {{FsDatasetImpl#getBlockInputStream}}.
> {code}
>   @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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message