kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-13903: Queue size metric in QuorumController

Open soarez opened this issue 2 years ago • 5 comments

In order to stay in-line with existing queue metrics in ControllerEventManager mbean, we need to include a queue size metric in KRaft mode.

The current size of the underlying queue in QuorumController needs to be exposed as:

kafka.controller:type=ControllerEventManager,name=EventQueueSize

Committer Checklist (excluded from commit message)

  • [ ] Verify design and implementation
  • [ ] Verify test coverage and CI build status
  • [ ] Verify documentation (including upgrade notes)

➡ Link to JIRA

soarez avatar Jun 20 '22 11:06 soarez

Hi Divij, thanks for having a look at this. The metric is documented. The goal is to bring it to KRaft.

soarez avatar Jun 20 '22 22:06 soarez

@mumrah could you review this PR? Thanks

soarez avatar Jul 12 '22 14:07 soarez

Thanks for the review @mumrah. I've applied your suggestion. It feels a bit strange to have the queue size supplier as an argument in QuorumControllerMetrics, but I like that the field is now final. Please have another look 🙏

soarez avatar Jul 15 '22 08:07 soarez

@mumrah a couple of the builds succeeded but some failed with a flaky test — testFencedLeaderRecovery. There is already a JIRA for it https://issues.apache.org/jira/browse/KAFKA-14093

soarez avatar Jul 21 '22 13:07 soarez

@mumrah could you take another look? Thanks

soarez avatar Jul 26 '22 13:07 soarez

Rebased and simplified the changes. PTAL @mumrah

soarez avatar Oct 16 '22 21:10 soarez