-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: fix assertion error serialization in exec()
Commit e6a2093 ("Add error handling at the server instance") broke assertion failure reporting in `server:exec()` in case verbose error serialization is enabled in Tarantool (`box_error_serialize_verbose` compatibility option is set to `new`). The problem is with the verbose error serialization, a raw string raised with `error()` is converted to an error object when marshalled through IPROTO while the `server:exec()` code expects it to remain a string because it encodes the original error in JSON. As a result, we get a mangled error like ``` {"status":"fail","class":"LuatestError","message":"...some_test.lua:42: expected: a value evaluating to true, actual: false"} {"code":32,"type":"LuajitError","trace":[{"file":"./src/lua/utils.c","line":687}]} ``` instead of ``` ...some_test.lua:42: expected: a value evaluating to true, actual: false ``` To fix this issue, we revert the JSON encoding hack introduced by the aforementioned commit. In order not to reintroduce issue #242 fixed by that commit, we simply rollback the active transaction (if any) in case the executed function failed. Closes #376
- Loading branch information
Showing
3 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters