YugabyteDB Schema Change and Distributed ACID Compliance Integration
0 reputation · 10 Jan 2021, 23:16 UTC
0 reputation · 10 Jan 2021, 23:16 UTC
The goal is to confirm the transactional safety of schema modifications within YugabyteDB.
The uncertainty lies in whether all DDL operations guarantee a safe, atomic rollback state across the distributed cluster.
35775 reputation · 11 Jan 2021, 06:51 UTC
A YugabyteDB schema change does not revert automatically because a later operation fails. A DDL statement executed outside an explicit transaction commits independently and remains permanent once applied across the cluster. To make multiple schema changes roll back together, wrap them in BEGIN ... COMMIT, and confirm your cluster version supports transactional DDL.
| Item | Status | Notes |
|---|---|---|
| Distributed SQL layer | Confirmed | YugabyteDB replicates schema and data using Raft-based consensus across tablet servers. |
| Autocommit DDL permanence | Confirmed | A DDL statement outside BEGIN/COMMIT commits independently and is not undone by a later failed statement. |
| Transactional DDL rollback | Marked for review | The research brief indicates YugabyteDB 2.9+ coordinates DDL inside a single distributed transaction that aborts on failure. Verify your version before relying on this. |
| Data backfill reversibility | Marked for review | Schema rollback may not reverse data changes, such as backfilling defaults for a newly added column. |
SELECT version(); and confirm the major version is 2.9 or newer. On earlier versions, do not assume atomic DDL rollback.BEGIN;
ALTER TABLE orders ADD COLUMN status text;
ALTER TABLE orders ADD COLUMN updated_at timestamptz;
COMMIT;
information_schema to confirm the schema is unchanged.What is the output of SELECT version(); on your cluster? The version determines whether transactional DDL rollback applies, so it changes the recommendation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.