-
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: Check for concurrent DSC job in legacy schema changer #137868
sql: Check for concurrent DSC job in legacy schema changer #137868
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice investigation!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @spilchen)
Running the legacy schema changer and the declarative schema changer concurrently can cause issues due to their different approaches to updating descriptors. Normally we have checks to prevent the legacy schema changer from running in such scenarios, timing issues persisted—particularly between `ALTER VIEW .. RENAME` (legacy) and `DROP VIEW` (DSC). In these cases, the view rename could delete the descriptor being processed by the drop view operation. This change addresses the timing issue by adding a check for an active DSC job at the start of the legacy schema changer job. With this fix, the issue could no longer be reproduced, whereas it was consistently reproducible before. Epic: none Closes: cockroachdb#137487 Release note (bug fix): Fixed a timing issue between `ALTER VIEW .. RENAME` and `DROP VIEW` that caused repeated failures in the `DROP VIEW` job.
37beafc
to
53ee43c
Compare
TFTR! bors r+ |
Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches. Issue #137487: branch-release-24.1, branch-release-24.2, branch-release-24.3. Issue #137828: branch-release-23.2, branch-release-24.1, branch-release-24.2, branch-release-24.3. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 53ee43c to blathers/backport-release-23.2-137868: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Running the legacy schema changer and the declarative schema changer concurrently can cause issues due to their different approaches to updating descriptors. Normally we have checks to prevent the legacy schema changer from running in such scenarios, timing issues persisted—particularly between
ALTER VIEW .. RENAME
(legacy) andDROP VIEW
(DSC). In these cases, the view rename could delete the descriptor being processed by the drop view operation.This change addresses the timing issue by adding a check for an active DSC job at the start of the legacy schema changer job. With this fix, the issue could no longer be reproduced, whereas it was consistently reproducible before.
Epic: none
Closes: #137487
Closes: #137828
Release note (bug fix): Fixed a timing issue between
ALTER VIEW .. RENAME
andDROP VIEW
that caused repeated failures in theDROP VIEW
job.