[ https://issues.apache.org/jira/browse/KAFKA-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14959588#comment-14959588 ]
Aditya Auradkar commented on KAFKA-2419: ---------------------------------------- I agree it would be nice to not need a tick thread.. but it seems like we can avoid this altogether on clients assuming we don't need sensors that can be GCed. You are right that we can check for expiry when creating new sensors or even when calling record() (though that might slow down the record quite a bit). But we can have a situation where a chunk of sensors get recorded during a short window and we have no new metrics for a long time. These sensor objects continue to occupy memory which could otherwise be freed.. this can be significant if they have several samples. [~junrao] - There isn't a strong reason (or use case) to support per-sensor expiration right now. I added it because it didn't seem to add any complexity to the implementation and could be useful down the road. > Allow certain Sensors to be garbage collected after inactivity > -------------------------------------------------------------- > > Key: KAFKA-2419 > URL: https://issues.apache.org/jira/browse/KAFKA-2419 > Project: Kafka > Issue Type: New Feature > Affects Versions: 0.9.0.0 > Reporter: Aditya Auradkar > Assignee: Aditya Auradkar > Priority: Blocker > Labels: quotas > Fix For: 0.9.0.0 > > > Currently, metrics cannot be removed once registered. > Implement a feature to remove certain sensors after a certain period of > inactivity (perhaps configurable). -- This message was sent by Atlassian JIRA (v6.3.4#6332)