cockroachdb / cockroachdb/cockroach
sql/schemachanger: Need Size Estimation & Warnings for Schema Changes
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Copying over a request from @kevinkokomani :
> Twice in the last week, we have had customer run into near-outages or actual P1 incidents when running ALTER TABLE ADD COLUMN on a large table in their production clusters.
>
> Under certain conditions, running this will rewrite the entire table. If the customer does not have enough disk capacity, the cluster can quickly run out of capacity and halt their workload or worse, start bringing down nodes/cause range unavailability.
>
> This schema change can look fairly benign and simple to a customer that does not know better.
>
> I think we need to give customers warnings and size estimations when they do jobs like these. If the size estimation is more than their disk capacity, then we should warn them and make them confirm before they proceed with the job, or stop them from proceeding with the job at all without increasing their disk capacity at least temporarily.
>
> I could see customers complaining about needing to increase disk capacity for these ADD COLUMN jobs, but that seems like a separate issue to chase down.
Jira issue: CRDB-39640
Epic CRDB-40071
Contributor guide
Assessment
This issue has not been assessed yet.