-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: cannot perform primary key changes while other schema changes are in progress #45510
Closed
1 of 4 tasks
Labels
A-schema-changes
skipped-test
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
X-anchored-telemetry
The issue number is anchored by telemetry references.
Comments
rohany
added
A-schema-changes
X-anchored-telemetry
The issue number is anchored by telemetry references.
labels
Feb 27, 2020
rafiss
added
the
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
label
May 12, 2021
Any news or timeline on when this feature might be implemented? |
We're working on generalized transactional schema changes. That work will encompass this. |
#42061 is the issue for generalized transactional schema changes |
Reopening to track unskipping test case in TestPrimaryKeyChangeWithPrecedingIndexCreation |
postamar
pushed a commit
to postamar/cockroach
that referenced
this issue
Jul 5, 2023
The declarative schema changer builder contains assertions on the state of elements and their targets and these could sometimes fail because the check which verifies that the corresponding descriptors are not already undergoing a schema change was performed later. This commit fixes this by moving the check earlier so the assertion is never reached in those cases. This commit removes a skipped test which is superseded by a new test in the schemachanger package. Fixes: cockroachdb#45510 Release note (bug fix): fixed a bug which manifested itself in error messages containing "failed to drop all of the relevant elements" when executing DDL statements with the declarative schema changer. What this really means is that there's a concurrent schema change that's ongoing. Instead we now behave as expected and wait for it to finish.
postamar
pushed a commit
to postamar/cockroach
that referenced
this issue
Jul 6, 2023
The declarative schema changer builder contains assertions on the state of elements and their targets and these could sometimes fail because the check which verifies that the corresponding descriptors are not already undergoing a schema change was performed later. This commit fixes this by moving the check earlier so the assertion is never reached in those cases. This commit removes a skipped test which is superseded by a new test in the schemachanger package. Fixes: cockroachdb#45510 Fixes: cockroachdb#102927 Fixes: cockroachdb#105754 Release note (bug fix): fixed a bug which manifested itself in error messages containing "failed to drop all of the relevant elements" when executing DDL statements with the declarative schema changer. What this really means is that there's a concurrent schema change that's ongoing. Instead we now behave as expected and wait for it to finish.
postamar
pushed a commit
to postamar/cockroach
that referenced
this issue
Jul 6, 2023
The declarative schema changer builder contains assertions on the state of elements and their targets and these could sometimes fail because the check which verifies that the corresponding descriptors are not already undergoing a schema change was performed later. This commit fixes this by moving the check earlier so the assertion is never reached in those cases. This commit removes a skipped test which is superseded by a new test in the schemachanger package. Fixes: cockroachdb#45510 Fixes: cockroachdb#102927 Fixes: cockroachdb#105754 Release note (bug fix): fixed a bug which manifested itself in error messages containing "failed to drop all of the relevant elements" when executing DDL statements with the declarative schema changer. What this really means is that there's a concurrent schema change that's ongoing. Instead we now behave as expected and wait for it to finish.
craig bot
pushed a commit
that referenced
this issue
Jul 6, 2023
105795: asim: add exact_bound, upper_bound, lower_bound to CmdArgs r=kvoli a=wenyihu6 **asim: move sim helper functions to helpers_test.go** This patch moves helper functions for scanning and parsing arguments from `datadriven_simulation_test.go` to `helpers_test.go`. Note that this commit does not change any existing functionality. Epic: None Release Note: None --- **asim: add exact_bound, upper_bound, lower_bound to CmdArgs** Previously, the allocator simulator's assertions were limited to accepting only a single threshold value for type=balance, type=steady, and type=stat assertions. This single threshold functioned as an upper limit for balance and steady and as an exact limit for stat. This is less ideal as there are instances where different types of bounds need to be asserted. To improve this, this patch replaces the argument `threshold=` with `exact_bound=, upper_bound=, and lower_bound=`. Note that only one argument should be specified at a time. If multiple are specified, the expected precedence order is exact_bound > upper_bound > lower_bound. Note that this commit does not change any existing functionality. Epic: None Release Note: None 106175: schemachanger,scbuild: fix assertion bug r=postamar a=postamar The declarative schema changer builder contains assertions on the state of elements and their targets and these could sometimes fail because the check which verifies that the corresponding descriptors are not already undergoing a schema change was performed later. This commit fixes this by moving the check earlier so the assertion is never reached in those cases. This commit removes a skipped test which is superseded by a new test in the schemachanger package. Fixes: #45510 Fixes: #102927 Fixes: #105754 Release note (bug fix): fixed a bug which manifested itself in error messages containing "failed to drop all of the relevant elements" when executing DDL statements with the declarative schema changer. What this really means is that there's a concurrent schema change that's ongoing. Instead we now behave as expected and wait for it to finish. Co-authored-by: Wenyi <wenyi.hu@cockroachlabs.com> Co-authored-by: Marius Posta <marius@cockroachlabs.com>
Should this issue be closed?
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-schema-changes
skipped-test
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
X-anchored-telemetry
The issue number is anchored by telemetry references.
We cannot currently perform primary key changes when an in progress schema change on the same table is occuring, or when a schema change on the same table has been started earlier in the same transaction. Before we can allow this, we need to investigate the following cases and ensure that primary key changes can handle them.
The text was updated successfully, but these errors were encountered: