HDFS-13359. DataXceiver hung due to the lock in FsDatasetImpl#getBlockInputStream. Contributed by Yiqun Lin.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org> (cherry picked from commit8a77a224c7
) (cherry picked from commita7bc09c596
)
This commit is contained in:
parent
be9ac8adf9
commit
f2007818fc
|
@ -778,7 +778,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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue