cockroachdb / cockroachdb/cockroach

sql/schemachanger: Need Size Estimation & Warnings for Schema Changes

Open
#125,861 4 comments 1 reaction 0 assignees View on GitHub
A-schema-changes C-enhancement O-support O-testcluster P-3 T-sql-foundations
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.