txn: stop TXN_SIGNATURE_ABORT override
When txn_commit/try_async() failed before going to WAL thread, they installed TXN_SIGNATURE_ABORT signature meaning that the caller and the rollback triggers must look at the global diag. But they called txn_rollback() before doing return and calling the triggers, which overrode the signature with TXN_SIGNATURE_ROLLBACK leading to the original error loss. The patch makes TXN_SIGNATURE_ROLLBACK installed only when a real rollback happens (via box_txn_rollback()). This makes the original commit errors like a conflict in the transaction manager and OOM not lost. Besides, ERRINJ_TXN_COMMIT_ASYNC does not need its own diag_log() anymore. Because since this commit the applier logs the correct error instead of ER_WAL_IO/ER_TXN_ROLLBACK. Closes #6027
Showing
- changelogs/unreleased/gh-6027-applier-lost-error.md 7 additions, 0 deletionschangelogs/unreleased/gh-6027-applier-lost-error.md
- src/box/txn.c 7 additions, 7 deletionssrc/box/txn.c
- test/replication/gh-6027-applier-error-show.result 82 additions, 0 deletionstest/replication/gh-6027-applier-error-show.result
- test/replication/gh-6027-applier-error-show.test.lua 31 additions, 0 deletionstest/replication/gh-6027-applier-error-show.test.lua
- test/replication/suite.cfg 1 addition, 0 deletionstest/replication/suite.cfg
- test/replication/suite.ini 1 addition, 1 deletiontest/replication/suite.ini
Please register or sign in to comment