[
https://issues.apache.org/jira/browse/CASSANDRA-14888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064468#comment-17064468
]
Alex Deparvu commented on CASSANDRA-14888:
------------------------------------------
thanks [~djoshi] for the discussion. I agree with the minimal approach, but
there was a fair amount of shuffle, mainly contained inside the TableMetrics
class.
I pushed a new version of the patch, let me know what you think. [0]
Changes:
* TableMetrics: I tried to aggregate all registered metrics into the 'all' set,
which now contains 'release' wrappers for each registered metric. it was a bit
of a stretch, so if there's a way to make the code cleaner I'm open to further
changing it.
* KeyspaceMetrics: this was a much simpler setup, most changes are trivial
refactoring of functions. release happens automatically thanks to the factory
keeping track of registered metrics.
* added some tests covering metrics unregistering for tables and keyspaces
[0]
https://github.com/apache/cassandra/compare/trunk...stillalex:CASSANDRA-14888
> Several mbeans are not unregistered when dropping a keyspace and table
> ----------------------------------------------------------------------
>
> Key: CASSANDRA-14888
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14888
> Project: Cassandra
> Issue Type: Bug
> Components: Observability/Metrics
> Reporter: Ariel Weisberg
> Assignee: Alex Deparvu
> Priority: Urgent
> Labels: patch-available
> Fix For: 4.0, 4.0-rc
>
> Attachments: CASSANDRA-14888.patch
>
>
> CasCommit, CasPrepare, CasPropose, ReadRepairRequests,
> ShortReadProtectionRequests, AntiCompactionTime, BytesValidated,
> PartitionsValidated, RepairPrepareTime, RepairSyncTime,
> RepairedDataInconsistencies, ViewLockAcquireTime, ViewReadTime,
> WriteFailedIdealCL
> Basically for 3 years people haven't known what they are doing because the
> entire thing is kind of obscure. Fix it and also add a dtest that detects if
> any mbeans are left behind after dropping a table and keyspace.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]