Open keith-mcclellan opened 5 years ago
This came up on a call with Tenable - we used it to troubleshoot a node that appeared to be slow.
Passing this to you, @ericharmeling, very late.
This came up recently on the KV team, where we found that very few people even on engineering understand exactly what SCATTER does.
When we document this, we should mention that SCATTER has the potential to result in data movement proportional in size to the size of the table being scattered. So it can take some time.
Nick Vigilante (nickvigilante) commented: KV team wants to put this on hold since they’re significantly changing the behavior of {{SCATTER}}.
Michael Wang (mwang1026) commented: When we document this, we want to make sure there’s a big warning that this could be a very disruptive operation, since it could cause a lot of rebalancing ranges across nodes which would lead to high network usage, high CPU and high disk utilization. (as in, it doesn’t just rebalance leaseholders it could rebalance replicas as well)
The original use of this feature was the scatter pre-split ranges in IMPORT and other backfill-y type features where we know a lot of volume is coming.
Michael Wang (mwang1026) commented: Here’s the PR https://github.com/cockroachdb/cockroach/pull/75894
Richard Loveland (rmloveland) commented: Hey Nick Vigilante - Michael Wang says the new behavior just merged (I think it’s this PR). I noticed you have a PR in progress - let me know if you still want this or if you would like me to do it since it’s also KVish
Nick Vigilante (nickvigilante) commented: Richard Loveland Would you be able to take this one? I’m putting my focus on releases for the next 2-3 weeks.
Keith McClellan commented:
https://www.cockroachlabs.com/docs/v19.1/alter-table.html doesn't cover SCATTER, which tells the database to redistribute the leaseholders. This is useful when troubleshooting hot ranges and to speed recovery after an outage.
Jira Issue: DOC-286