[ 
https://issues.apache.org/jira/browse/HDFS-17777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

William Montaz updated HDFS-17777:
----------------------------------
    Description: 
ExcessRedundancyMap uses synchronized keyword for threadsafety. However prior 
to introduce this class, the operations such as contains were made without a 
new lock, they were called inside BlockManager with verification that the 
fsNamesystem lock was held in read or write mode depending on the situation.
 
ExcessRedundancyMap now forces all thread to grab the same exclusive lock, even 
if in general a lot more read are performed on the class.
 
By using a ReentrantReadWriteLock for ExcessRedundancyMap we could improve 
throughput of the namenode. Another approach could be to introduce the same 
asserts on namesystem lock as it seems those methods are always called in the 
context of the FSNamesystem lock.
 
 

  was:
ExcessRedundancyMap uses synchronized keyword for threadsafety. However prior 
to introduce this class, the operations such as contains were made without a 
new lock, they were called inside BlockManager with verification that the 
fsNamesystem lock was held in read or write mode depending on the situation.
 
ExcessRedundancyMap now forces all thread to grab the same exclusive lock, even 
if in general a lot more read are performed on the class.
 
By using a ReentrantReadWriteLock for ExcessRedundancyMap we could improve 
throughput of the namenode
 
 


> Improve ExcessRedundancyMap locking semantics
> ---------------------------------------------
>
>                 Key: HDFS-17777
>                 URL: https://issues.apache.org/jira/browse/HDFS-17777
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 3.4.0, 3.3.6, 3.4.1
>            Reporter: William Montaz
>            Priority: Major
>         Attachments: Capture d’écran 2025-04-30 à 14.32.41.png
>
>
> ExcessRedundancyMap uses synchronized keyword for threadsafety. However prior 
> to introduce this class, the operations such as contains were made without a 
> new lock, they were called inside BlockManager with verification that the 
> fsNamesystem lock was held in read or write mode depending on the situation.
>  
> ExcessRedundancyMap now forces all thread to grab the same exclusive lock, 
> even if in general a lot more read are performed on the class.
>  
> By using a ReentrantReadWriteLock for ExcessRedundancyMap we could improve 
> throughput of the namenode. Another approach could be to introduce the same 
> asserts on namesystem lock as it seems those methods are always called in the 
> context of the FSNamesystem lock.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to