Skip to content
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

scatter: downreplication takes a long time #17000

Closed
benesch opened this issue Jul 12, 2017 · 10 comments
Closed

scatter: downreplication takes a long time #17000

benesch opened this issue Jul 12, 2017 · 10 comments
Assignees
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.

Comments

@benesch
Copy link
Contributor

benesch commented Jul 12, 2017

Discovered while implementing a proper scatter in #16249. AdminScatter is able to very quickly upreplicate (e.g., in a few minutes), but the replicate queue can take ten minutes to downreplicate. Figure out why; @a-robinson claims the downreplication should take approximately as long as the upreplication.

This behavior is easy to reproduce with a four-node local cluster with preeexisting data: https://github.com/benesch/crdb-playground-scatter

@a-robinson
Copy link
Contributor

Was this fixed by your DeleteRange change?

@benesch
Copy link
Contributor Author

benesch commented Jul 17, 2017

Don't think so, but you'd know better. Here's the downreplication after a 15GB restore with ~1k ranges.

screenshot 2017-07-17 14 44 56

Takes about 10m.

@benesch
Copy link
Contributor Author

benesch commented Jul 17, 2017

And here's a screenshot that's, like, actually useful:

screenshot 2017-07-17 14 48 17

@benesch
Copy link
Contributor Author

benesch commented Jul 17, 2017

Try not to look too hard at the leaseholders per store graph.

@a-robinson
Copy link
Contributor

Assuming I'm squinting properly at that graph, it looks like it took around 7 minutes, so I guess it's still not fixed.

@benesch
Copy link
Contributor Author

benesch commented Jul 17, 2017

Yeah, sorry, it's ~10m. How long would you expect it to take?

@a-robinson a-robinson added this to the Later milestone Jul 17, 2017
@a-robinson
Copy link
Contributor

About the same amount of time as up-replicating. The problem, though, is that's the wrong graph to be looking at, since it's including not just the down-replication time, but also the replica GC time, since the metric behind the replicas-per-store graph only gets decremented when a replica gets GC'ed, not when it gets removed from the consensus group. Usually those events are close together, but they aren't guaranteed to be. The "Range Operations" graph would be more useful.

I'll check it out sometime, but it doesn't seem urgent.

@benesch
Copy link
Contributor Author

benesch commented Jul 17, 2017

That is incredibly useful to know. Yeah, no rush at all; I may look into it too.

@tbg tbg added the A-kv-replication Relating to Raft, consensus, and coordination. label May 15, 2018
@tbg tbg added the C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. label Jul 22, 2018
@petermattis petermattis removed this from the Later milestone Oct 5, 2018
@tbg
Copy link
Member

tbg commented Oct 11, 2018

I wouldn't be surprised if this were fixed now. Don't the decommissioning tests verify something similar?

@a-robinson
Copy link
Contributor

Scatter no longer scatters replicas, and when we bring that aspect of it back (#26438) it won't add all replicas before removing any. I think it's safe to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-replication Relating to Raft, consensus, and coordination. C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
Projects
None yet
Development

No branches or pull requests

4 participants