Skip to content

Commit

Permalink
kvserver: segregate replica metrics in the replicateQueue
Browse files Browse the repository at this point in the history
This commit adds separate metrics for tracking adding/removing/rebalancing
of voting/non-voting replicas. For instance, the add replica count is an
aggregation of voter and non-voter addition counts, which are now also
separately tracked. Also added a metric for tracking adding and removing
decommissioning replicas.

Fixes #60694
Release justification: additive change to add metrics for existing
functionality
Release note: None
  • Loading branch information
amygao9 committed Mar 7, 2022
1 parent e9d856e commit 9f37eee
Show file tree
Hide file tree
Showing 5 changed files with 577 additions and 43 deletions.
11 changes: 11 additions & 0 deletions pkg/kv/kvserver/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,17 @@ const (
nonVoterTarget
)

// replicaStatus represents whether a replica is currently alive,
// dead or decommissioning.
type replicaStatus int

const (
_ replicaStatus = iota
alive
dead
decommissioning
)

// AddChangeType returns the roachpb.ReplicaChangeType corresponding to the
// given targetReplicaType.
//
Expand Down
Loading

0 comments on commit 9f37eee

Please sign in to comment.