HDFS-13359. DataXceiver hung due to the lock in FsDatasetImpl#getBlockInputStream. Contributed by Yiqun Lin.

Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
Yiqun Lin 2019-08-09 18:38:57 -07:00 committed by Wei-Chiu Chuang
parent e02ffed1b1
commit 8a77a224c7
1 changed files with 1 additions and 1 deletions

View File

@ -794,7 +794,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
long seekOffset) throws IOException {
ReplicaInfo info;
synchronized(this) {
try (AutoCloseableLock lock = datasetLock.acquire()) {
info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock());
}