hemantk-12 opened a new pull request, #5512:
URL: https://github.com/apache/ozone/pull/5512

   ## What changes were proposed in this pull request?
   Snapshot's snap diff acceptance test failed with an exception `Metrics 
source OmSnapshotMetrics already exists!`. Based on exception and message looks 
like `OmSnapshotMetrics` is getting initialized more than once. Even though it 
is singleton class, it is not synchronized. So it is possible that two or more 
threads can try to register `OmSnapshotMetrics` metric at the same time and 
fail except the first one.
   
   This change is to put `register` inside a `synchronized` block and added 
double check to make sure that it is registered only once.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-9559
   
   ## How was this patch tested?
   Existing unit test.
   


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