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

tianhang tang commented on HBASE-27617:
---------------------------------------

{quote}
If we made that change, we could do RefCnt tracking like we do for other 
objects. When a region opens, the RefCnt for the TableLatencies increments. 
When region closes, it decrements. When RefCnt for a TableLatencies object 
reaches 0, it gets removed.
{quote}
Today I toke some time to read the relevant code roughly and found that, 
hbase-metrics-api can already support this requirement, MetricRegistries 
encapsulates the management of refCount. And Using hbase-metrics-api to replace 
directly using metric2 api seems is also in the roadmap. 

So if my understand is correct, what we actually need to do is to use 
hbase-metrics-api. Is it right?

> Make metrics from MetricsTableLatenciesImpl removable
> -----------------------------------------------------
>
>                 Key: HBASE-27617
>                 URL: https://issues.apache.org/jira/browse/HBASE-27617
>             Project: HBase
>          Issue Type: Bug
>            Reporter: tianhang tang
>            Assignee: tianhang tang
>            Priority: Major
>
> Now the table latency metrics will last forever on a RS.
> Could reproduce this issue easily:
> 1. Create a test table and the region opened on RS_A;
> 2. Do a query;
> 3. Move the table to another group;
> 4. See JMX on RS_A, table latency metrics still exists and will not deleted.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to