kafka-ui icon indicating copy to clipboard operation
kafka-ui copied to clipboard

Brokers: Wrong 'Online partition count' value

Open abhirathod95 opened this issue 1 year ago • 6 comments

Issue submitter TODO list

  • [X] I've looked up my issue in FAQ
  • [X] I've searched for an already existing issues here
  • [X] I've tried running main-labeled docker image and the issue still persists there
  • [X] I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

Kafka UI used to show the actual partition count per broker in the "Online Partitions" column under "Brokers" tab. After upgrading to v1.0.0, each broker row shows the total number of online partitions instead. Weirdly, the "partition skew" calculations are still accurate.

For example take a balanced cluster with 178 partitions, rep factor of 3, and 4 brokers. There are a total of 534 replicas in the cluster and each broker row in the table should show 133 or 134 online partitions. However, all of the rows are showing 178.

Expected behavior

Each broker should show the correct number of online partition replicas it holds. Given the example above, it should be 133 or 134 per broker.

Your installation details

I'm using v1.0.0 with a generic config file, nothing unique.

Steps to reproduce

Deploy kafka ui and link it to any cluster. I've tried it with 4 different clusters and they all show the same thing.

Screenshots

No response

Logs

No response

Additional context

No response

abhirathod95 avatar Aug 21 '24 20:08 abhirathod95

Hi abhirathod95! 👋

Welcome, and thank you for opening your first issue in the repo!

Please wait for triaging by our maintainers.

As development is carried out in our spare time, you can support us by sponsoring our activities or even funding the development of specific issues. Sponsorship link

If you plan to raise a PR for this issue, please take a look at our contributing guide.

github-actions[bot] avatar Aug 21 '24 20:08 github-actions[bot]

Hi @Haarolean,

We're encountering the exact same issue - each broker row is displaying the total number of online partitions, rather than showing only the partitions located on that specific broker.

Could you please take a look at this?

image

bachmanity1 avatar Oct 10 '24 10:10 bachmanity1

TODO: Rather than setting 'online partitions' column value to onlinePartitionCount field value from cluster info, use the field partitionsLeader from broker info.

Haarolean avatar Oct 10 '24 16:10 Haarolean

Rather than setting 'online partitions' column value to onlinePartitionCount field value from cluster info, use the field partitionsLeader from broker info.

I think it should be just partitions rather than partitionsLeader.

bachmanity1 avatar Oct 10 '24 16:10 bachmanity1

I think it should be just partitions rather than partitionsLeader.

why?

Haarolean avatar Oct 10 '24 17:10 Haarolean

why?

I believe the partitionsLeader field represents the number of leaders located on a particular broker, and this information is already displayed in the Leaders column. The partitions field, on the other hand, reflects the number of partitions on a broker, so it would make more sense to use this value for the Online Partitions column.

bachmanity1 avatar Oct 11 '24 01:10 bachmanity1

+1 We are encountering the same issue

AntoonBeres avatar Apr 08 '25 13:04 AntoonBeres