-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: also load uninitialized replicas, verify replicaID #93317
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tbg
force-pushed
the
store-repl-init-uninited
branch
from
December 9, 2022 13:06
c71e944
to
9ea7b7f
Compare
tbg
changed the title
kvserver: also load uninitialized replicaskvserver: update tests that failed to persist ReplicaIDkvserver: simplify an assertionkvserver: introduce loadAndReconcileReplicaskvserver: validate descriptor locationkvserver: improve an assertionkvserver: remove dead code
kvserver: also load uninitialized replicas, verify replicaID
Dec 9, 2022
tbg
force-pushed
the
store-repl-init-uninited
branch
2 times, most recently
from
December 16, 2022 11:27
ca8ba39
to
863932d
Compare
TODO when I update this following review feedback: also add the TODO on loadAndReconcileReplicas. |
pav-kv
approved these changes
Dec 19, 2022
Release note: None
To support a separate raft log[^1] we need to perform certain reconciliation operations at start-up to recover from a lack of atomicity between the state and log engines. This commit gets us closer to being able to do so by listing all replicas before starting the store, which means we now have a handle on which uninitialized replicas exist in the system. As a first application of this knowledge, we now ensure that every replica has a persisted FullReplicaID. Since this would not necessarily be true for stores that have seen older releases, we backfill the ReplicaID in 23.1 and can then require it to be present in a future release that forces a migration through 23.1. [^1]: cockroachdb#16624 Epic: CRDB-220 Release note: None
Epic: none Release note: None
tbg
force-pushed
the
store-repl-init-uninited
branch
from
December 19, 2022 15:16
863932d
to
48f0a0a
Compare
TFTR! bors r=pavelkalinnikov |
Build failed (retrying...): |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To support a separate raft log1 we need to perform certain
reconciliation operations at start-up to recover from a lack
of atomicity between the state and log engines.
This commit gets us closer to being able to do so by listing
all replicas before starting the store, which means we now
have a handle on which uninitialized replicas exist in the
system.
As a first application of this knowledge, we now ensure that every
replica has a persisted FullReplicaID. Since this would not necessarily
be true for stores that have seen older releases, we backfill the
ReplicaID in 23.1 and can then require it to be present in a future
release that forces a migration through 23.1.
Epic: CRDB-220
Release note: None
Footnotes
https://github.com/cockroachdb/cockroach/issues/16624 ↩