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:
parent
e02ffed1b1
commit
8a77a224c7
@ -794,7 +794,7 @@ public InputStream getBlockInputStream(ExtendedBlock b,
|
|||||||
long seekOffset) throws IOException {
|
long seekOffset) throws IOException {
|
||||||
|
|
||||||
ReplicaInfo info;
|
ReplicaInfo info;
|
||||||
synchronized(this) {
|
try (AutoCloseableLock lock = datasetLock.acquire()) {
|
||||||
info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock());
|
info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user