-
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
sql, storage: tolerate existing splits in AdminSplit and SPLIT AT #14273
sql, storage: tolerate existing splits in AdminSplit and SPLIT AT #14273
Conversation
Reviewed 8 of 8 files at r1. pkg/kv/split_test.go, line 231 at r1 (raw file):
yikes, this mixing of contexts. while you extract one while you're here? pkg/storage/client_split_test.go, line 317 at r1 (raw file):
huh, how come the conflicting descriptor case is absent? Comments from Reviewable |
pkg/storage/client_split_test.go, line 317 at r1 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Sorry, I'm confused by the question. I just removed the "range already split" error case since that's no longer a thing. Comments from Reviewable |
pkg/storage/client_split_test.go, line 317 at r1 (raw file): Previously, RaduBerinde wrote…
Ah, absent from the list of expected errors? No idea, I'll try to hunt down whoever touched this code. Comments from Reviewable |
pkg/storage/client_split_test.go, line 317 at r1 (raw file): Previously, RaduBerinde wrote…
Looks like it was removed in 4b0578a @vivekmenezes do we need to update this comment? Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. pkg/kv/split_test.go, line 231 at r1 (raw file): Previously, tamird (Tamir Duberstein) wrote…
that should be "can you ...". not sure how i mangled that sentence so badly. pkg/storage/client_split_test.go, line 317 at r1 (raw file): Previously, RaduBerinde wrote…
Yeah, looks like you can update the comment and remove the Comments from Reviewable |
This error is not useful; indeed many callers go through hoops to ignore it. Extending SPLIT AT to handle multiple split points makes this error even more annoying. Removing this error in favor of a silent no-op (based on discussion in cockroachdb#14146). The backup test is changed to read the meta descriptor instead on relying on the old behavior to verify splits.
979c85d
to
0cd25b5
Compare
TFTR! Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. pkg/kv/split_test.go, line 231 at r1 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. Did it for the entire file (in a separate commit). pkg/storage/client_split_test.go, line 317 at r1 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. Comments from Reviewable |
Reviewed 1 of 8 files at r1, 1 of 1 files at r2, 1 of 1 files at r3. Comments from Reviewable |
Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
`TestStoreRangeSplitAtRangeBounds` should have been in conflict with cockroachdb#14273, but the test had been broken for a while because we were sending `AdminSplit` requests to the wrong range. This change fixes the test by asserting that attempting to split a range at its start key is a no-op which does not actually perform a split. Additionally, we had places in our code that claimed an `AdminSplit` request to the end of a range was a no-op and other places that claimed it was an error. In reality, it should have been a `RangeKeyMismatchError`, so this change removes the incorrect code/comments and asserts this behavior more directly in the test. Note that the change in `replica_command.go` does not alter current behavior. The change simply removes an impossible condition.
`TestStoreRangeSplitAtRangeBounds` should have been in conflict with cockroachdb#14273, but the test had been broken for a while because we were sending `AdminSplit` requests to the wrong range. This change fixes the test by asserting that attempting to split a range at its start key is a no-op which does not actually perform a split. Additionally, we had places in our code that claimed an `AdminSplit` request to the end of a range was a no-op and other places that claimed it was an error. In reality, it should have been a `RangeKeyMismatchError`, so this change removes the incorrect code/comments and asserts this behavior more directly in the test. Note that the change in `replica_command.go` does not alter current behavior. The change simply removes an impossible condition.
`TestStoreRangeSplitAtRangeBounds` should have been in conflict with cockroachdb#14273, but the test had been broken for a while because we were sending `AdminSplit` requests to the wrong range. This change fixes the test by asserting that attempting to split a range at its start key is a no-op which does not actually perform a split. Additionally, we had places in our code that claimed an `AdminSplit` request to the end of a range was a no-op and other places that claimed it was an error. In reality, it should have been a `RangeKeyMismatchError`, so this change removes the incorrect code/comments and asserts this behavior more directly in the test. Note that the change in `replica_command.go` does not alter current behavior. The change simply removes an impossible condition.
tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go
This error is not useful; indeed many callers go through hoops to ignore it.
Extending SPLIT AT to handle multiple split points makes this error even more
annoying. Removing this error in favor of a silent no-op (based on discussion
in #14146).
The backup test is changed to read the meta descriptor instead on relying on
the old behavior to verify splits.
This change is