Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve transaction unreliability issues in schema alterations #11279

Merged
merged 5 commits into from
Feb 4, 2022

Conversation

rijkvanzanten
Copy link
Member

@rijkvanzanten rijkvanzanten commented Jan 25, 2022

CockroachDB doesn't support doing schema changes in transactions after a regular write. SQLite doesn't support nested transactions, MySQL simply ignores transactions altogether when doing schema operations.

Long story short, we can't reliably rely on transactions in schema changes (eg /collections, /fields, and /relations). This PR is the start of a (bigger) change to effectively remove the usage of transactions in schema operations, in favor of doing proper validation before doing the schema alterations.

Scratch that. Seems like simply doing the schema operation first in the transaction makes all vendors play nicely ✨

Fixes #11280

@rijkvanzanten rijkvanzanten self-assigned this Feb 4, 2022
@rijkvanzanten rijkvanzanten marked this pull request as ready for review February 4, 2022 00:38
@rijkvanzanten rijkvanzanten added this to the v9-next milestone Feb 4, 2022
@rijkvanzanten rijkvanzanten merged commit eee8725 into main Feb 4, 2022
@rijkvanzanten rijkvanzanten deleted the transactions branch February 4, 2022 01:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CockroachDB fails on schema changes
1 participant