cockroachdb / docs

CockroachDB user documentation
https://cockroachlabs.com/docs
Creative Commons Attribution 4.0 International
190 stars 458 forks source link

ALTER TABLE table_name SCATTER is not documented #4975

Open keith-mcclellan opened 5 years ago

keith-mcclellan commented 5 years ago

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

keith-mcclellan commented 5 years ago

This came up on a call with Tenable - we used it to troubleshoot a node that appeared to be slow.

jseldess commented 3 years ago

Passing this to you, @ericharmeling, very late.

nvanbenschoten commented 3 years ago

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.

exalate-issue-sync[bot] commented 2 years ago

Nick Vigilante (nickvigilante) commented: KV team wants to put this on hold since they’re significantly changing the behavior of {{SCATTER}}.

exalate-issue-sync[bot] commented 2 years ago

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.

exalate-issue-sync[bot] commented 2 years ago

Michael Wang (mwang1026) commented: Here’s the PR https://github.com/cockroachdb/cockroach/pull/75894

exalate-issue-sync[bot] commented 2 years ago

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

exalate-issue-sync[bot] commented 2 years ago

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.