You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/09/27 06:49:23 UTC

[GitHub] [ozone] kerneltime commented on a diff in pull request #3766: HDDS-7232. Introduce container-level lock while handling container report events by SCM and Recon

kerneltime commented on code in PR #3766:
URL: https://github.com/apache/ozone/pull/3766#discussion_r980823527


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerStateManagerImpl.java:
##########
@@ -303,24 +317,30 @@ public void addContainer(final ContainerInfoProto containerInfo)
 
     lock.writeLock().lock();

Review Comment:
   I think, if we change the `containers` map to be a concurrent hash map, then only, `reinitialize` should need a write lock, and the rest of the locks can be read locks.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org