txn: fix execution order of commit triggers
Both commit and rollback triggers are currently added to the list head. As a result, they are both run in the reverse order. This is correct for rollback triggers, because this matches the order in which statements that added the triggers are rolled back, but this is wrong for commit triggers. For example, suppose we create a space and then create an index for it in the same transaction. We expect that on success we first run the trigger that commits the space and only then the trigger that commits the index, not vice versa. That said, reverse the order of commit triggers in the scope of preparations for transactional DDL.
Loading
Please register or sign in to comment