smengcl commented on a change in pull request #696: HDDS-3056. Allow users to list volumes they have access to, and optionally allow all users to list all volumes URL: https://github.com/apache/hadoop-ozone/pull/696#discussion_r409905641
########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/VolumeManagerImpl.java ########## @@ -453,23 +449,11 @@ public boolean checkVolumeAccess(String volume, OzoneAclInfo userAcl) @Override public List<OmVolumeArgs> listVolumes(String userName, String prefix, String startKey, int maxKeys) throws IOException { - metadataManager.getLock().acquireLock(USER_LOCK, userName); + metadataManager.getLock().acquireWriteLock(USER_LOCK, userName); Review comment: I could either leave it alone, or change it to `acquireReadLock`. The latter should be fine though. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org