-
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: rewrite TestStoreRangeRebalance #10515
storage: rewrite TestStoreRangeRebalance #10515
Conversation
Reviewed 3 of 3 files at r1. pkg/storage/client_raft_test.go, line 2040 at r1 (raw file):
s/ take// and re-wrap this guy pkg/storage/client_raft_test.go, line 2042 at r1 (raw file):
this test name doesn't make sense. The test is now the equivalent of pkg/storage/client_raft_test.go, line 2045 at r1 (raw file):
this is nonsense now, right? no rebalancing will take place in this test no matter what options are passed. pkg/storage/client_raft_test.go, line 2058 at r1 (raw file):
duplicates the argument to Comments from Reviewable |
0e1e31c
to
f334f77
Compare
BTW, I don't think it's safe to say that this fixes #10193 and #10497 - those failures produce nonsense error messages like
which definitely are worth tracking down. Review status: 2 of 3 files reviewed at latest revision, 4 unresolved discussions. Comments from Reviewable |
Those are due to periodic gossiping of the first range for which we're also transferring the lease in unexpected ways. We can't disable that periodic gossiping in the previous incarnation of this test or the test doesn't make progress. Review status: 2 of 3 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. pkg/storage/client_raft_test.go, line 2040 at r1 (raw file):
|
f334f77
to
978d6e7
Compare
As mentioned in person, the troubling thing about those error messages is that they are saying "replica X is not the leaseholder, X is", which is obviously nonsense. Reviewed 1 of 1 files at r2. pkg/storage/client_raft_test.go, line 2042 at r1 (raw file):
Ah, right, didn't notice that there was still more stuff below the retry loop. Comments from Reviewable |
978d6e7
to
efd4ada
Compare
Reviewed 2 of 3 files at r1, 1 of 1 files at r2, 1 of 1 files at r3. pkg/storage/client_raft_test.go, line 2042 at r3 (raw file):
We already have the same test in TestStoreRangeUpReplicate (with a capital R), so if there's nothing to salvage from TestStoreRangeRebalance we should just delete it. But I think the old test is worth fixing and keeping - upreplication and rebalancing are separate code paths, and I don't think we have much other testing of the rebalancing path. Comments from Reviewable |
efd4ada
to
d42cb5b
Compare
Review status: 3 of 5 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending. pkg/storage/client_raft_test.go, line 2042 at r3 (raw file):
|
d42cb5b
to
5b43b62
Compare
Reviewed 1 of 1 files at r3, 2 of 2 files at r4. pkg/storage/client_raft_test.go, line 2042 at r3 (raw file):
|
5b43b62
to
de3434d
Compare
Review status: 4 of 5 files reviewed at latest revision, 4 unresolved discussions, some commit checks pending. pkg/storage/replicate_queue_test.go, line 40 at r4 (raw file):
|
Review status: 4 of 5 files reviewed at latest revision, 5 unresolved discussions, some commit checks pending. pkg/storage/replicate_queue_test.go, line 51 at r5 (raw file):
I'm investigating this before merging. The allocator thinks that everything is balanced while Comments from Reviewable |
Reviewed 1 of 1 files at r5. pkg/storage/replicate_queue_test.go, line 85 at r4 (raw file):
|
de3434d
to
d71fa95
Compare
Review status: 4 of 5 files reviewed at latest revision, 3 unresolved discussions, some commit checks pending. pkg/storage/replicate_queue_test.go, line 51 at r5 (raw file):
|
Reviewed 1 of 1 files at r6. pkg/storage/replicate_queue_test.go, line 85 at r4 (raw file):
|
d71fa95
to
954dd90
Compare
Review status: 4 of 5 files reviewed at latest revision, 4 unresolved discussions. pkg/storage/replicate_queue_test.go, line 85 at r4 (raw file):
|
Reviewed 1 of 1 files at r7. Comments from Reviewable |
Add the check that preemptive snapshots are being used to TestStoreRangeUpReplicate. Add TestReplicateQueueRebalance for testing that basic rebalancing is working. Fixes cockroachdb#10193 Fixes cockroachdb#10156 Fixes cockroachdb#9395
954dd90
to
f920b33
Compare
Rather than the somewhat complicated rebalancing scenario, use a simple
scenario that we perform up-replication of range 1 from 1 to 3 nodes. We
check that this up-replication is performed using preemptive
snapshots. The more complicated scenario was very fragile, frequently
being broken by innocuous changes.
Fixes #10497
Fixes #10193
Fixes #10156
Fixes #9395
This change is