fmorg-git commented on PR #10521:
URL: https://github.com/apache/ozone/pull/10521#issuecomment-4711483471

   > Better to also do double checked locking in the create() method:
   > 
   > ```
   > public static S3GatewayMetrics create(OzoneConfiguration conf) {
   >   S3GatewayMetrics local = instance;
   >   if (local == null) {
   >     synchronized (S3GatewayMetrics.class) {
   >       local = instance;
   >       if (local == null) {
   >         MetricsSystem ms = DefaultMetricsSystem.instance();
   >         local = ms.register(SOURCE_NAME, "S3 Gateway Metrics",
   >             new S3GatewayMetrics(conf));
   >         instance = local;
   >       }
   >     }
   >   }
   >   return local;
   > }
   > ```
   
   updated


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