[ 
https://issues.apache.org/jira/browse/CASSANDRA-14888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17129384#comment-17129384
 ] 

Caleb Rackliffe commented on CASSANDRA-14888:
---------------------------------------------

Finished looking at the tests, and had a couple minor comments:

1.) {{TableMetricsTest#testMetricsCleanupOnDrop()}} already uses 
{{recreateTable()}}, so you might be able to get away with using a descriptive 
static name for the table.
2.) We might not need {{OrderedJUnit4ClassRunner}} in {{KeyspaceMetricsTest}}.
3.) {{KeyspaceMetricsTest#registerUnregister()}} could perhaps be renamed 
{{testMetricsCleanupOnDrop()}} to follow the pattern from {{TableMetricsTest}}.
4.) Echoing [~cnlwsu]'s earlier suggestion, a brief test around un-registering 
MV metrics (ex. in {{ViewWriteMetrics}}) would be a good idea. (The number of 
metrics there is small, so I don't expect we'd need to add any more complex 
machinery for that. The unit test would catch leaks going forward...)

Otherwise, this patch looks like a nice step in the right direction.

> 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-beta
>
>         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: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to