bbeaudreault commented on code in PR #5323:
URL: https://github.com/apache/hbase/pull/5323#discussion_r1267654199


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/MetricsIO.java:
##########
@@ -24,10 +24,12 @@
 @InterfaceAudience.Private
 public class MetricsIO {
 
+  private static MetricsIO instance;

Review Comment:
   This probably should be volatile. Below in your new method, you should do 
synchronization if it's null so it only gets instantiated once. Example: 
https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClientConfigHelper.java#L87



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

Reply via email to