-
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/schemachanger: reassign owned by and concurrent declarative schema changer drops can conflict #93101
Conversation
3b8e946
to
3c18951
Compare
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!
…ptors Previously, the legacy schema changer would create a job to clean up database/schema descriptors, however it would only care if the descriptor was marked as dropped. This was inadequate because with the declarative schema changer becoming in use, its possible for it to interfere with the declarative schema changer, if a legacy schema changer job is kicked off after the pre-commit phase of a declarative drop. To address this, the legacy schema changer now checks if the descriptor ID is in the job details. Release note: None
Previously, we had logic to disable the declarative schema changer for drop owned by if the user had any privileges in the system.privilege table. Unfortunately, the error handling for this logic was broken. This patch, properly checks for errors in this code. Release note: None
Previously, when a database descriptor was labeled as dropped, we didn't bother cleaning up the schema entry inside. This could be problematic in certain resolution code paths where we will resolve databases by name even if they are even dropped, which can cause these paths to hit a missing descriptor error. The patch addresses, this bug by modifying dropped descriptors inside the decalrative schema changer during execution. Release note: None
@postamar TFTR! |
bors r+ |
Build succeeded: |
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 37df598 to blathers/backport-release-22.2-93101: 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 22.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Informs: #87572
A number of bugs exist inside DROP OWNED / REASSIGNED OWNED BY inside the declarative schema changer: