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

kvserver: sep-raft-log: integrate splits, merges, conf changes #93249

Open
tbg opened this issue Dec 8, 2022 · 1 comment
Open

kvserver: sep-raft-log: integrate splits, merges, conf changes #93249

tbg opened this issue Dec 8, 2022 · 1 comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv-replication KV Replication Team

Comments

@tbg
Copy link
Member

tbg commented Dec 8, 2022

Splits and merges pose an additional challenge under a separate raft log since they change replica boundaries.

  • splits have tricky handling for the right-hand side - there are many cases to consider1: the RHS might not exist yet, it might exist as an uninited replica, and in either case the right-hand side might already have been removed from this store, in which case we might have to shorten the LHS during the split. None of this is new but integrating with sep-raft-log should be done carefully.
  • splits, merges, conf change application should be synced (this avoids having to know how to apply them at init time, though maybe this could be lifted)
  • merges need all replicas to be caught up, and durably so2, i.e. another sync there.

We will surely discover a bit more complexity here than is known once we actually set out to doing this.

https://github.com/tbg/cockroach/blob/e292a73f2af0e55aa760cce168622732c0716ff6/pkg/kv/kvserver/replicas_storage.go#L238-L248

Epic: CRDB-220

Jira issue: CRDB-22242

Footnotes

  1. https://github.com/cockroachdb/cockroach/blob/f19bb2a9899728f62379e2444bc1bb07bdf684e4/pkg/kv/kvserver/store_split.go#L234-L252

  2. https://github.com/tbg/cockroach/blob/e292a73f2af0e55aa760cce168622732c0716ff6/pkg/kv/kvserver/replicas_storage.go#L568-L572

@tbg tbg added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv-replication KV Replication Team labels Dec 8, 2022
@blathers-crl
Copy link

blathers-crl bot commented Dec 8, 2022

cc @cockroachdb/replication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv-replication KV Replication Team
Projects
None yet
Development

No branches or pull requests

1 participant