andyhuangdev opened a new pull request, #12091:
URL: https://github.com/apache/ozone/pull/12091

   ## What changes were proposed in this pull request?
   
   Keep shared RDBMetrics registered for the lifetime of the JVM, following the 
approach in #11756.
   
   All RDBStore instances share this metrics source. Closing any store, 
including a snapshot DB during eviction or purge, currently unregisters it for 
the active OM DB and other open stores. Opening another store then registers a 
new metrics instance, while existing stores continue updating the unregistered 
instance.
   
   This change removes shared metrics unregistration from RDBStore.close() and 
deletes the unused unregister method. It also updates the mini-cluster metrics 
leak checks and changes existing counter assertions to verify increments from a 
baseline. Per-store metrics cleanup remains unchanged.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-16695](https://issues.apache.org/jira/browse/HDDS-16695)
   
   ## How was this patch tested?
   
   Added a regression test verifying that closing one store preserves metrics 
registration and published counter updates, and that reopening a store after 
all stores close retains the same metrics instance and counters. The test 
failed before the fix and passed afterward.
   
   - All 42 tests in TestRDBStore and TestRDBTableStore passed.
   - All 20 tests in TestMetricsLeakAssertion passed.
   - Checkstyle and git diff --check passed.


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