KAFKA-14959: remove delayed queue and exempt sensors during ClientQuota and ClientRequestQuota managers shutdown#13700
KAFKA-14959: remove delayed queue and exempt sensors during ClientQuota and ClientRequestQuota managers shutdown#13700machi1990 wants to merge 2 commits intoapache:trunkfrom
Conversation
|
@rajinisivaram @dajac please review when you've the chance |
|
I am wondering if these sensors that are dynamically created should be removed as well: https://github.com/apache/kafka/blob/ca11a87e86e8e3c65043f747f35cae770b1efb7c/core/src/main/scala/kafka/server/ClientQuotaManager.scala#L393-L402 looking for suggestion here |
|
@divijvaidya since you worked on #13623, would you be open to give this PR a review? Thanks |
divijvaidya
left a comment
There was a problem hiding this comment.
Thank you for the PR. It's worth noting that the ClientQuotaManagers are shutdown on broker shutdown and hence, it's not a big deal if we are leaking metrics right now. Nevertheless, it's good practice to close metrics properly and remove them from the JMX server.
There was a problem hiding this comment.
Another validation we can perform is to ensure that
assertTrue(metrics.metrics().isEmpty) at @AfterEach of BaseClientQuotaManagerTest
There was a problem hiding this comment.
I looked onto this and apparently the metrics.metrics() List is never empty because this metric https://github.com/apache/kafka/blob/ca11a87e86e8e3c65043f747f35cae770b1efb7c/clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java#L180 isn't at the moment removed when we Metrics#close() is called.
Is that to be expected? If not, I can create a separate JIRA and address it separate from this PR.
Thanks for the review @divijvaidya I've addressed all of your comments except for one where I've left a suggested course of action. Let me know what you think |
…ta and ClientRequestQuota managers shutdown
|
I wanted to let you know that this is on my radar and I need a few more days to get to this. |
Thanks @divijvaidya |
|
Hi @divijvaidya friendly ping on this PR, I know you are busy preparing 3.5.1 release, so whenever you've some free cycle, please review, thanks. |
|
I've limited bandwidth thus I won't be able to carry this work forward. I'll happily close this MR and unassign myself from the JIRA for someone else to take it over. |
Follows up on #13623 (comment)
Committer Checklist (excluded from commit message)