Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storeliveness: create package and interface #125058

Closed
miraradeva opened this issue Jun 4, 2024 · 1 comment · Fixed by #126398
Closed

storeliveness: create package and interface #125058

miraradeva opened this issue Jun 4, 2024 · 1 comment · Fixed by #126398
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. A-leader-leases Related to the introduction of leader leases C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team

Comments

@miraradeva
Copy link
Contributor

miraradeva commented Jun 4, 2024

Create storeliveness package, and Fabric interface.

// Fabric is a representation of the Store Liveness fabric. It provides
// information about uninterrupted periods of "support" between stores.
type Fabric interface {
	SupportFor(id slpb.StoreIdent) (slpb.Epoch, bool)
	SupportFrom(id slpb.StoreIdent) (slpb.Epoch, slpb.Expiration, bool)
}

Jira issue: CRDB-39243

Epic CRDB-37522

@miraradeva miraradeva added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-kv-replication Relating to Raft, consensus, and coordination. T-kv KV Team A-leader-leases Related to the introduction of leader leases labels Jun 4, 2024
Copy link

blathers-crl bot commented Jun 4, 2024

cc @cockroachdb/replication

@miraradeva miraradeva self-assigned this Jun 24, 2024
miraradeva added a commit to miraradeva/cockroach that referenced this issue Jun 28, 2024
This patch introduces the Fabric interface, which any local store can
use to obtain information about Store Liveness support provided and
requested by other remote stores.

The API includes:

- `SupportFor(id StoreIdent) (Epoch, bool)`: given a remote store id,
  returns whether the local store supports the remote store, and an
  epoch denoting the current uninterrupted period of support.

- `SupportFrom(id StoreIdent) (Epoch, hlc.Timestamp, bool)`: given a
  remote store id, returns whether the local store has support from the
  remote store, an epoch denoting the current uninterrupted period of
  support, and an timestamp indicating when this support expires.

Fixes: cockroachdb#125058

Release note: None
craig bot pushed a commit that referenced this issue Jul 1, 2024
126398: storeliveness: create Store Liveness interface r=nvanbenschoten a=miraradeva

This patch introduces the Fabric interface, which any local store can use to obtain information about Store Liveness support provided and requested by other remote stores.

The API includes:

- `SupportFor(id StoreIdent) (Epoch, bool)`: given a remote store id, returns whether the local store supports the remote store, and an epoch denoting the current uninterrupted period of support.

- `SupportFrom(id StoreIdent) (Epoch, hlc.Timestamp, bool)`: given a remote store id, returns whether the local store has support from the remote store, an epoch denoting the current uninterrupted period of support, and an timestamp indicating when this support expires.

Fixes: #125058

Release note: None

Co-authored-by: Mira Radeva <[email protected]>
@craig craig bot closed this as completed in db9f2db Jul 1, 2024
@github-project-automation github-project-automation bot moved this to Incoming in KV Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. A-leader-leases Related to the introduction of leader leases C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
No open projects
Status: Incoming
Development

Successfully merging a pull request may close this issue.

1 participant