cockroachdb / cockroachdb/cockroach

storeliveness: pre-populate support-from map

Open
#130,328 0 comments 0 reactions 0 assignees View on GitHub
A-kv-replication A-leader-leases C-enhancement T-kv
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

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.