Montura opened a new pull request, #6654:
URL: https://github.com/apache/ozone/pull/6654

   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:
   1. `ConcurrentHashMap<UUID, DatanodeInfo> nodeMap`
   2. `ConcurrentHashMap<UUID, Set<ContainerID>> nodeToContainer`
   3. `private final ReadWriteLock lock`
   
   Both `read` and `write` operations in `NodeStateMap` are protected by `lock`.
   
   ## What changes were proposed in this pull request?
   
   1. Replace `ConcurrentHashMap` with pure `HashMap` to avoid extra lock 
operations.
   2. Create `NodeStateMap::getNodeInfoUnsafe` method without 
`lock.readLock.lock()` to use it when `lock.writeLock.lock()` has already 
acquired:
       -  `NodeStateMap::updateNodeHealthState`
       - `NodeStateMap::updateNodeOperationalState`
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-10830
   
   ## How was this patch tested?
   
   Use standalone tests


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to