andyhuangdev opened a new pull request, #11553: URL: https://github.com/apache/ozone/pull/11553
## What changes were proposed in this pull request? OM double buffer metrics disappear after a follower installs a Ratis snapshot. Pausing the state machine unregisters the metrics source, but rebuilding the double buffer reuses the existing metrics singleton without registering it again. Flushes continue, but the metrics remain unavailable until the OM JVM restarts. This patch clears the singleton when unregistering the source, using the same class lock as create(). A rebuilt double buffer therefore registers a fresh metrics source. Regression coverage verifies that the source is registered and exports updated flush counters after two consecutive double buffer recreations. Existing parameterized tests are updated to expect counters for each double buffer rather than accumulated values across test cases. ## What is the link to the Apache JIRA [HDDS-17038](https://issues.apache.org/jira/browse/HDDS-17038) ## How was this patch tested? - Confirmed the new regression test failed before the fix because the metrics source was missing. - Passed all 79 tests in TestOzoneManagerDoubleBufferWithDummyResponse, TestOzoneManagerDoubleBuffer, and TestOzoneManagerStateMachine. - Passed ./hadoop-ozone/dev-support/checks/checkstyle.sh. - Passed git diff --check. -- 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]
