cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.5k stars 3.7k forks source link

storeliveness: add SupportState persistence #125061

Open miraradeva opened 4 weeks ago

miraradeva commented 4 weeks ago

Persist the relevant SupportState data. For a requester state, persist the maxRequested time before each round of heartbeats. For a supporter state, persist the maxWithdrawn time as well as the epochs and support expiration of all supported stores.

Ensure StoreLiveness calls to SupportFor and SupportFrom do not perform synchronous writes.

Use a separation between volatile state (being changed while processing a batch of messages) and durable state (successfully persisted). Answering calls to SupportFor and SupportFrom should use the durable state, while processing batches of messages should use the volatile state to be able to batch the resulting writes.

Jira issue: CRDB-39246

Epic CRDB-37522

blathers-crl[bot] commented 4 weeks ago

cc @cockroachdb/replication