limbo: set user for triggers on sync transaction
Commit/rollback triggers are run asynchronously, upon receiving the write status from WAL. We can't run them in the original fiber that submitted the WAL request, because it would open a time window between writing a transaction to WAL and committing it in tx, which could lead to violating the cascading rolback principles. As a result, commit/rollback triggers run with admin privileges. The issue was already solved for confirming async transaction, but session and user are still not correct, when the transaction is confirmed by the limbo. Let's fix this issue by temporarily setting session and credentials to the original fiberfor running commit/rollback triggers. Closes #8742 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-8742-session-on-triggers-with-sync-tx.md 5 additions, 0 deletions...gs/unreleased/gh-8742-session-on-triggers-with-sync-tx.md
- src/box/txn_limbo.c 19 additions, 0 deletionssrc/box/txn_limbo.c
- test/replication-luatest/gh_8505_synchro_triggers_test.lua 33 additions, 0 deletionstest/replication-luatest/gh_8505_synchro_triggers_test.lua
Loading