Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
txn: undo commit/rollback triggers when reverting to savepoint
When reverting to a savepoint inside a DDL transaction, apart from undoing changes done by the DDL statements to the system spaces, we also have to - Run rollback triggers installed after the savepoint was set, because otherwise changes done to the schema by DDL won't be undone. - Remove commit triggers installed after the savepoint, because they are not relevant anymore, apparently. To achieve that let's append DDL triggers right to txn statements. This allows us to easily discard commit triggers and run rollback triggers when a statement is rolled back. Note, txn commit/rollback triggers are not removed, because they are still used by applier and Lua box.on_commit/on_rollback functions. Closes #4364 Closes #4365
- Loading branch information
Showing
5 changed files
with
183 additions
and
56 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
Oops, something went wrong.