-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28014: sql: fix schema change reverse mutation and rollback job setup r=vivekmenezes a=vivekmenezes This change fixes a number of problems related to the rollback of a schema change. 1. During a rollback the reversal of a mutation would reverse an incomplete list of mutations dependent on the reversed mutation. It didn't pick all the mutations representing the mutation-id being reversed, and didn't do a graph traversal beyond a depth of 1 while picking out the mutations needing reversal. 2. The jobs associated with the schema changes reversed through the graph traversal would be left in the pending state rather than marked failed. 2. A job associated with a schema change would be marked failed outside of the transaction rolling back the schema change. the system could land up in a situation where the job was marked failed but the schema change had not been rolled back. Or a rolled-back schema change could be marked failed even though it could not be marked failed. 3. The rollback job associated with the reversed schema change was created outside of the schema change reversal transaction. This could result in a situation where a rollback job was created for a rollback job. A reversal of a reversal of a schema change is not permitted and the double reversal would fail, but the new ROLL BACK of a ROLL BACK job would still exist because it was created outside the transaction. fixes #27760 related to #27273 related to #27402 Co-authored-by: Vivek Menezes <[email protected]>
- Loading branch information
Showing
5 changed files
with
278 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.