txn: reverse commit trigger list only before running commit triggers
Commit triggers must be run in the same order they are added, see commit 01343264 ("txn: fix execution order of commit triggers"). To achieve that we added a new trigger method, trigger_add_tail(), which adds new triggers to the trigger list tail rather than to the head, and now we use this new method for adding commit triggers. Come to think of it now, that solution was rather confusing. First, commit triggers are still added to the head of the list from Lua. Second, to revert triggers on rollback-to-savepoint it would be really more convenient to have both commit and rollback trigger lists have the same order. So this patch reverts the above-mentioned commit and instead simply uses a reverse iterator to run commit triggers.
Showing
- src/box/txn.c 30 additions, 9 deletionssrc/box/txn.c
- src/box/txn.h 2 additions, 11 deletionssrc/box/txn.h
- src/lib/core/trigger.cc 12 additions, 0 deletionssrc/lib/core/trigger.cc
- src/lib/core/trigger.h 15 additions, 11 deletionssrc/lib/core/trigger.h
- test/engine/transaction.result 2 additions, 2 deletionstest/engine/transaction.result
Loading
Please register or sign in to comment