Details
-
Improvement
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
3.0.0-beta1
-
None
-
None
-
Add a private object for synchronization as default. This should be able to improve performance.
Description
In currently implementation, ReplicaMap takes an external lock for synchronization.
In function FsDatasetImpl#FsDatasetImpl(), the object is for synchronization is the same lock object used by FsDatasetImpl routines.
and in private FsDatasetImpl#addVolume(), the same lock is used for synchronization as well.
ReplicaMap tempVolumeMap = new ReplicaMap(datasetLock);
We can potentially eliminate the heavyweight lock for synchronizing ReplicaMap instances. If it's not necessary, this could reduce lock contention on the datasetLock object and improve performance.
Could you please give me some suggestions? Thanks a lot!
Fenghua
Attachments
Attachments
Issue Links
- relates to
-
HDFS-10828 Fix usage of FsDatasetImpl object lock in ReplicaMap
- Resolved