cockroachdb / cockroachdb/cockroach
storeliveness: pre-populate support-from map
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Currently, the support-from map is populated on a per-need basis: whenever Raft requests support from another store by calling `fabric.SupportFrom`, store liveness will start heartbeating that store to establish support from it. This works well with gradually rolling out leader leases; only stores that have ranges with fortification turned on (controlled by `kv.raft.leader_fortification.fraction_enabled`) will heartbeat each other.
Alternatively, for a faster ramp-up of store liveness support on startup, we can pre-populate the support-from map by calling `SupportFrom` for any pair of stores that share replicas of the same ranges. We already [iterate over all range descriptors](https://github.com/cockroachdb/cockroach/blob/master/pkg/kv/kvserver/store.go#L2221) at store startup, so this will not be an added overhead.
Jira issue: CRDB-42000
Contributor guide
Assessment
This issue has not been assessed yet.