[ 
https://issues.apache.org/jira/browse/HDFS-16090?focusedWorklogId=616069&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-616069
 ]

ASF GitHub Bot logged work on HDFS-16090:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jun/21 10:14
            Start Date: 29/Jun/21 10:14
    Worklog Time Spent: 10m 
      Work Description: aajisaka commented on a change in pull request #3148:
URL: https://github.com/apache/hadoop/pull/3148#discussion_r660477088



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
##########
@@ -340,8 +343,7 @@ public static InetSocketAddress createSocketAddr(String 
target) {
   private DataNodePeerMetrics peerMetrics;
   private DataNodeDiskMetrics diskMetrics;
   private InetSocketAddress streamingAddr;
-  
-  // See the note below in incrDatanodeNetworkErrors re: concurrency.
+
   private LoadingCache<String, Map<String, Long>> datanodeNetworkCounts;

Review comment:
       I think `HashMap<String, LongAdder>` is more efficient than 
`ConcurrentHashMap<String, Long>` because the LongAdder instance in the Map is 
never replaced in this case.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 616069)
    Time Spent: 1h 40m  (was: 1.5h)

> Fine grained locking for datanodeNetworkCounts
> ----------------------------------------------
>
>                 Key: HDFS-16090
>                 URL: https://issues.apache.org/jira/browse/HDFS-16090
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> While incrementing DataNode network error count, we lock entireĀ LoadingCache 
> in order to increment network count of specific host. We should provide fine 
> grained concurrency for this update because locking entire cache is redundant 
> and could impact performance while incrementing network count for multiple 
> hosts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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