[
https://issues.apache.org/jira/browse/HDDS-10830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai resolved HDDS-10830.
-------------------------------------
Fix Version/s: 1.5.0
Resolution: Done
> Replace ConcurrentHashMap with HashMap protected by ReadWriteLock in
> NodeStateMap
> ---------------------------------------------------------------------------------
>
> Key: HDDS-10830
> URL: https://issues.apache.org/jira/browse/HDDS-10830
> Project: Apache Ozone
> Issue Type: Improvement
> Components: SCM
> Reporter: Andrei
> Assignee: Andrei
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.5.0
>
>
> There is a class
> [NodeStateMap|https://github.com/apache/ozone/blob/master/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/states/NodeStateMap.java#L47]
> with 3 fields:
> # {{ConcurrentHashMap<UUID, DatanodeInfo> nodeMap}}
> # {{ConcurrentHashMap<UUID, Set<ContainerID>> nodeToContainer}}
> # {{private final ReadWriteLock lock}}
> Both *read* and *write* in _NodeStateMap_ are protected by {*}lock{*}.
> We can safely replace _ConcurrentHashMap_ with pure _HashMap_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]