swagle commented on a change in pull request #174: HDDS-2493. Sonar: Locking on a parameter in NetUtils.removeOutscope. URL: https://github.com/apache/hadoop-ozone/pull/174#discussion_r346929609
########## File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetUtils.java ########## @@ -32,6 +32,8 @@ */ public final class NetUtils { public static final Logger LOG = LoggerFactory.getLogger(NetUtils.class); + private static final Object EXCLUDE_NODES_LOCK = new Object(); Review comment: I agree that we could move this out, since only 1 caller. Why sync on static final risky? ---------------------------------------------------------------- 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