sumitagrawl commented on code in PR #10463:
URL: https://github.com/apache/ozone/pull/10463#discussion_r3377262038


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerEntry.java:
##########
@@ -33,7 +33,7 @@
  */
 public class ContainerEntry {
   private final ContainerInfo info;
-  private final Map<DatanodeID, ContainerReplica> replicasMap = new 
TreeMap<>();
+  private final Map<DatanodeID, ContainerReplica> replicasMap = new 
ConcurrentSkipListMap<>();

Review Comment:
   No, its not always synchronized by container ID.
   1. Synchronized map via ContainerStateManagerImpl.lock for container list 
read, add container, remove container, protecting container map access.
   2. synchronized map's individual element via 
ContainerStateManagerImpl.stripedLock at container level via container ID, but 
**not protecting** container map



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