Skip to content

ccl/sqlproxyccl: add metrics to track the number of rebalance requests#79874

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
jaylim-crl:jay/220412-add-balancer-metrics
Apr 13, 2022
Merged

ccl/sqlproxyccl: add metrics to track the number of rebalance requests#79874
craig[bot] merged 1 commit intocockroachdb:masterfrom
jaylim-crl:jay/220412-add-balancer-metrics

Conversation

@jaylim-crl
Copy link
Copy Markdown
Contributor

This commit addresses a TODO by adding metrics to track the number of rebalance
requests (total, queued, and running). The following metrics are added:

  • proxy.balancer.rebalance.running
  • proxy.balancer.rebalance.queued
  • proxy.balancer.rebalance.total

Release note: None

@jaylim-crl jaylim-crl requested review from a team as code owners April 13, 2022 02:25
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@jaylim-crl jaylim-crl requested review from andy-kimball and jeffswenson and removed request for a team April 13, 2022 02:25
@jaylim-crl jaylim-crl force-pushed the jay/220412-add-balancer-metrics branch from 9e3fa7a to 21043df Compare April 13, 2022 02:28
Copy link
Copy Markdown
Collaborator

@jeffswenson jeffswenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work :)

This commit addresses a TODO by adding metrics to track the number of rebalance
requests (total, queued, and running). The following metrics are added:
- proxy.balancer.rebalance.running
- proxy.balancer.rebalance.queued
- proxy.balancer.rebalance.total

Release note: None
@jaylim-crl jaylim-crl force-pushed the jay/220412-add-balancer-metrics branch from 21043df to cb73631 Compare April 13, 2022 14:44
Copy link
Copy Markdown
Contributor Author

@jaylim-crl jaylim-crl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andy-kimball)


pkg/ccl/sqlproxyccl/balancer/metrics.go, line 48 at r1 (raw file):

Previously, JeffSwenson (Jeff Swenson) wrote…

nit: (really nitty) name this NewMetrics() instead of MakeMetrics(). New is the most common prefix in go for factory functions.

Done. Thanks. Also, I believe CRDB has a convention of using NewX for something that returns a pointer, and MakeX for regular objects.

@jaylim-crl
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r=JeffSwenson

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 13, 2022

Build succeeded:

@craig craig bot merged commit ba9baca into cockroachdb:master Apr 13, 2022
@jaylim-crl jaylim-crl deleted the jay/220412-add-balancer-metrics branch April 13, 2022 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants