[
https://issues.apache.org/jira/browse/HDDS-16695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siyao Meng updated HDDS-16695:
------------------------------
Attachment: HDDS-16695-CR-R12-shared-rocksdb-metrics-source.patch
> Closing any snapshot DB unregisters the process wide RocksDB metrics source
> ---------------------------------------------------------------------------
>
> Key: HDDS-16695
> URL: https://issues.apache.org/jira/browse/HDDS-16695
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Siyao Meng
> Priority: Minor
> Attachments: HDDS-16695-CR-R12-shared-rocksdb-metrics-source.patch
>
>
> h3. Mechanism
> {{RDBStore.close()}} calls the static {{RDBMetrics.unRegister()}}
> ({{RDBStore.java:242-268}}, {{RDBMetrics.java:126-130}}), which nulls the
> process wide singleton and unregisters the shared "Rocks DB Metrics" source.
> The active OM DB and every snapshot DB are {{RDBStore}}s in one JVM sharing
> that one source, and nothing reference counts it.
> h3. Impact
> Closing any snapshot DB tears down the RocksDB metrics source shared with the
> active OM DB, so the JMX counters an operator trends reset to zero. Snapshot
> closes happen routinely, from {{SnapshotCache}} eviction
> ({{SnapshotCache.java:407}}) and purge time invalidate ({{:161}}). Metrics
> only, with no data or availability impact.
> h3. Reproduction
> {{repro/test_bugCR-R12_shared_rocksdb_metrics.sh}}. Evidence in
> {{repro/logs/ev-cr2.log}}.
> h3. Patch
> {{HDDS-XXXXX-CR-R12-shared-rocksdb-metrics-source.patch}} is attached. It
> applies to 20e6a1c0f6039248373efd3eb1d7f2afcf7f1535 and carries the fix plus
> a regression test that was verified to fail without the fix and pass with it.
> {code:none}
> mvn test -pl hadoop-hdds/framework -Dtest=TestRDBMetrics
> {code}
> Found by code review of the OM snapshot cache under HDDS-15926, on commit
> 20e6a1c0f6039248373efd3eb1d7f2afcf7f1535. Generated with Specula (Claude Opus
> 5).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]