Mingxiang Li created HDFS-16429:
-----------------------------------
Summary: Add DataSetLockManager to maintain locks for FsDataSetImpl
Key: HDFS-16429
URL: https://issues.apache.org/jira/browse/HDFS-16429
Project: Hadoop HDFS
Issue Type: Improvement
Components: hdfs
Affects Versions: 3.2.0
Reporter: Mingxiang Li
Assignee: Mingxiang Li
Fix For: 3.2.0
1、Use lockManager to maintain two level lock for FsDataSetImpl.
The simple lock model like this.Parts of implemented as follows
* As for finalizeReplica(),append(),createRbw()....First get BlockPoolLock
read lock,and then get BlockPoolLock-volume-lock write lock.
* As for getStoredBlock(),getMetaDataInputStream()....First get BlockPoolLock
read lock,and the then get BlockPoolLock-volume-lock read lock.
* As for deepCopyReplica(),getBlockReports() get the BlockPoolLock read lock.
* As for delete hold the BlockPoolLock write lock.
2、Make LightWeightResizableGSet become thread safe.It not become performance
bottleneck if we make it thread safe.We can reduce lock grain size for
ReplicaMap when make LightWeightResizableGSet thread safe.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]