cockroachdb / cockroachdb/cockroach

kvserver: range availability metrics should incorporate Raft state

Open
#102,837 1 comment 0 reactions 0 assignees View on GitHub
A-cluster-observability C-enhancement O-sre T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Range availability metrics, e.g. `ranges.underreplicated` and `ranges.unavailable`, are calculated solely based on the node liveness state. This can be unreliable in cases where nodes are able to heartbeat, but replicas/ranges are unavailable from the point of view of the Raft leader or leaseholder, for example under partial/asymmetric network partitions, disk stalls, or other failure modes.

These checks should additionally take into account e.g. the Raft state, lease state, and replica circuit breakers. See also #61118.

https://github.com/cockroachdb/cockroach/blob/ac3e633279c7333fe6544d1376593f83f57a5add/pkg/kv/kvserver/replica_metrics.go#L215-L235

Jira issue: CRDB-27677

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.