-
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
storage: ensure nonoverlapping ranges #7905
Conversation
This needs an associated test. We're already exercising the various conditions for Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
Reviewed 1 of 1 files at r1. Comments from Reviewable |
1d6b183
to
65f49b4
Compare
Test added, PTAL. I've verified locally that the test fails with the old version, but let me know if there's some way I should add a failing test pre-change to verify that the test does what we think it does on Circle. Review status: 1 of 2 files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from Reviewable |
65f49b4
to
de15ff0
Compare
Review status: 1 of 2 files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from Reviewable |
I think that's ok as is. Reviewed 1 of 1 files at r1, 1 of 1 files at r3. storage/store.go, line 1815 [r3] (raw file):
This should be below the check you just edited? storage/store_test.go, line 590 [r3] (raw file):
This test digs into a lot of internals, but I don't really have a good idea of how to change it. storage/store_test.go, line 595 [r3] (raw file):
storage/store_test.go, line 626 [r3] (raw file):
? storage/store_test.go, line 630 [r3] (raw file):
Capitalization, punctuation. storage/store_test.go, line 631 [r3] (raw file):
Always grab the prescribed locks, even if you think you don't need to. storage/store_test.go, line 632 [r3] (raw file):
avoid this magic number and define a variable above. Comments from Reviewable |
de15ff0
to
ddbfcd1
Compare
Review status: 0 of 2 files reviewed at latest revision, 7 unresolved discussions, some commit checks pending. storage/store.go, line 1815 [r3] (raw file):
|
Reviewed 2 of 2 files at r4. storage/store_test.go, line 633 [r4] (raw file):
Lock? Comments from Reviewable |
47d2cbc
to
78d4ea5
Compare
Review status: 1 of 2 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending. storage/store_test.go, line 633 [r4] (raw file):
|
Reviewed 1 of 1 files at r5. Comments from Reviewable |
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. storage/store_test.go, line 637 [r5] (raw file):
You should also test a replica for which storage/store_test.go, line 640 [r5] (raw file):
Spurious blank line. Comments from Reviewable |
55b2279
to
9e89e33
Compare
Review status: 1 of 2 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending. storage/store_test.go, line 637 [r5] (raw file):
|
Review status: 1 of 2 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. storage/store_test.go, line 637 [r5] (raw file):
|
processRangeDescriptorUpdateLocked checks to see if there is an existing range before adding a Replica. We should widen the check to look for any overlapping ranges. This addresses one of the cases in Issue cockroachdb#7830.
9e89e33
to
974b69b
Compare
Review status: 1 of 2 files reviewed at latest revision, 3 unresolved discussions, some commit checks pending. storage/store_test.go, line 632 [r6] (raw file):
|
processRangeDescriptorUpdateLocked checks to see if there is an
existing range before adding a Replica. We should widen the check to
look for any overlapping ranges. This addresses one of the cases in #7830.
This change is