Description
DataXceiver hung due to the lock that locked by
FsDatasetImpl#getBlockInputStream (have attached stack).
@Override // FsDatasetSpi public InputStream getBlockInputStream(ExtendedBlock b, long seekOffset) throws IOException { ReplicaInfo info; synchronized(this) { info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock()); } ... }
The lock synchronized(this) used here is expensive, there is already one AutoCloseableLock type lock defined for ReplicaMap. We can use it instead.
Attachments
Attachments
Issue Links
- relates to
-
HDFS-10682 Replace FsDatasetImpl object lock with a separate lock object
- Resolved