trigger: log error in triggers that does not throw an error
Now on_access_denied and on_schema_init triggers do not throw error, so it just sinks into oblivion, which is not good because a thrown error indicates that something went wrong and database administrator should be definitely notified about it. The commit makes Tarantool log errors thrown from these triggers with error level. Also, the commit adds a test checking if all triggers are either raise an error or log it. Closes #9309 @TarantoolBot document Title: Mention that triggers are guaranteed to throw an error or log it Now all triggers are either have a direct impact on the execution flow (e.g. close a connection or throw an error) or print a message to error log when they throw an error. We have a separate entry for triggers in Tarantool documentation, which lists the properties of the triggers - I think it's a perfect place for this new property.
Showing
- changelogs/unreleased/gh-9309-errors-in-triggers.md 5 additions, 0 deletionschangelogs/unreleased/gh-9309-errors-in-triggers.md
- src/box/error.cc 16 additions, 10 deletionssrc/box/error.cc
- src/box/schema.cc 2 additions, 0 deletionssrc/box/schema.cc
- test/box-luatest/gh_9309_errors_in_triggers_test.lua 208 additions, 0 deletionstest/box-luatest/gh_9309_errors_in_triggers_test.lua
Loading
Please register or sign in to comment