[ 
https://issues.apache.org/jira/browse/HADOOP-19346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17901293#comment-17901293
 ] 

ASF GitHub Bot commented on HADOOP-19346:
-----------------------------------------

sjlee commented on PR #7187:
URL: https://github.com/apache/hadoop/pull/7187#issuecomment-2501797003

   > We are running a hadoop version without a lock protecting the 
InnerCache.get() and basically rediscovered this bug, after two months' 
investigation.
   > 
   
   Oh so was this due to a correctness bug not performance that led you to 
this? It wasn't very clear from the JIRA description.
   
   > Performance-wise, I think they should be similar? Only one thread will be 
allowed to create the new FileSystem instance for each missing key in both 
cases.
   
   ConcurrentHashMap is better because RWL locks globally whenever there is a 
mutation whereas ConcurrentHashMap can be more granular.




> ViewFileSystem.InnerCache: Replaced ReentrantReadWriteLock with 
> ConcurrentHashMap/putIfAbsent()
> -----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-19346
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19346
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: common
>            Reporter: Xing Lin
>            Assignee: Xing Lin
>            Priority: Minor
>              Labels: pull-request-available
>
> Use of ReentrantReadWriteLock  + Map can be replaced/simplified with a 
> ConcurrentHashMap. 



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

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

Reply via email to