-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: simplify scatter implementation #17644
Conversation
All of the tests still pass, which makes me suspect that scatter isn't well tested. @benesch I'm curious if you can run this on restore workloads to see if it has any negative impact. My suspicion is that it will be fine, but I'd prefer to be cautious at this time in the cycle. |
d20435c
to
bb145a0
Compare
I should mention that I've been testing this on |
Yes, the one scatter test (see split_at_test.go) is currently disabled
because it's too flaky to be useful. The only tests that exercise the code
path in any useful fashion are the restore production tests.
…On Mon, Aug 14, 2017 at 9:16 PM Peter Mattis ***@***.***> wrote:
I should mention that I've been testing this on sky and it provides near
ideal scattering in my testing. And the implementation seems easier to
understand conceptually. In effect, it temporarily provides a dedicated
goroutine to the replicate queue for the specified replica.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17644 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA15IA_4pLPluN7SUaVGqif7p8CcJs4Uks5sYPFRgaJpZM4O3Ef_>
.
|
LGTM. I like the simplicity of this much more than what was there before, but I'd wait on @benesch to test how it works for restore in practice (and perhaps double check what was causing problems in the original scatter implementation). This still suffers from the problems in #17341, but that's a feature more than a bug at this point in the release cycle. Reviewed 2 of 2 files at r1. Comments from Reviewable |
This might actually speed up RESTORE as now we'll only ever be restoring into 3 replicas while previously we could be restoring into 6. 🤞 |
Running restore tests now! |
@benesch Can you try running again with |
Yep, take your time. @a-robinson This is evidence towards #17645 or that stats-based rebalancing still needs tuning. |
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/storage/replica_command.go, line 3995 at r1 (raw file):
You can do Comments from Reviewable |
Rather than using custom logic in Replica.adminScatter, call into replicateQueue.processOneChange until no further action needs to be taken. This fixes a major caveat with the prior implementation: replicas were not removed synchronously leading to conditions where an arbitrary number of replicas could be added to a range via scattering. Fixes cockroachdb#17612
bb145a0
to
7d668a3
Compare
Review status: 1 of 2 files reviewed at latest revision, 1 unresolved discussion. pkg/storage/replica_command.go, line 3995 at r1 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Clever. I can't imagine the heap allocation is problematic here. Changed. Comments from Reviewable |
Ok, seems to match TPCH10 on a recent master (301e5fc) without stats-based rebalancing: Things seem really broken with stats-based rebalancing: In both cases the restore took about 22m. Turns out there's a default cluster setting limiting the RESTORE write rate to 30MB/s, which is why these aren't taking the 15m I was expecting. So the new scatter seems as good as the old one. LGTM! 🎉 |
@petermattis, we should shrink the test you've been running on sky and turn it into an acceptance test for scatter. |
@benesch Yes, scatter needs better testing. The test would essentially be |
Yeah, I think the criteria for success is actually straightforward to measure. I'll file an issue. |
Never mind. I just saw #17660. |
Rather than using custom logic in Replica.adminScatter, call into
replicateQueue.processOneChange until no further action needs to be
taken. This fixes a major caveat with the prior implementation: replicas
were not removed synchronously leading to conditions where an arbitrary
number of replicas could be added to a range via scattering.
Fixes #17612