From: Nikita Pettik <korablev@tarantool.org> To: tarantool-patches@dev.tarantool.org Cc: v.shpilevoy@tarantool.org Subject: [Tarantool-patches] [PATCH v3 0/6] Stacked diagnostics Date: Mon, 6 Apr 2020 17:17:09 +0300 [thread overview] Message-ID: <cover.1586181413.git.korablev@tarantool.org> (raw) Branch: https://github.com/tarantool/tarantool/commits/np/gh-1148-stacked-diag Issue: https://github.com/tarantool/tarantool/issues/1148 https://github.com/tarantool/tarantool/issues/4829 Implementation of stacked diagnostics in Tarantool according to RFC: https://github.com/tarantool/tarantool/commit/1acd32d98f628431429b427df19caa9d269bb9c8). Error structure is extended with double linked list; Lua and C interfaces are provided to interact with it; stacked diagnostics is supported in IProto protocol and net.box modules. Note that patch-set also contains fix of #4829 since some tests rely on the fact that box.error(err_obj) promotes error to diagnotic area. Changes in v2: - renamed 'prev' and 'next' links in struct error to 'cause' and 'effect'; - moved all tests related to box.error module to a separate file (box/error.test.lua); - removed recursion from error_unref(); - removed box_error_construct() and box_error_add() from public API; - removed error_prev() getter which was used to access error.prev member in Lua (now it is accessed directly via error._prev); - moved diag_add() usages to a separate commit; - several ref/unref usages corrections in the code; - added mp_check_* auxiliary checks to iproto_decode_error_stack(); - other minor refactoring (removing unused headers and redundant testing facilities, fixing comments etc); - rebased to fresh master branch. Changes in v3: - refactored iproto_decode_error_stack(): removed mp_check_*() calls, added checks on broken map keys values including overflowed values; - added unit tests to cover iproto_decode_error_stack() function (which can be called by replication applier); - integration tests were simplified: instead of using complicated schema involving persistent functions and functional indexes, simple function which raises stack of errors is used; - optimized error_set_prev() function: cycle detection is avoided in most cases; - other refactoring: code, tests and commit message clean-ups; added a few comments and assertion checks. - rebased to fresh master branch. @ChangeLog * Always promote error created via box.error() to diagnostic area (gh-4829). * Introduced stacked diagnostick area: now each Lua table representing error object features .prev member and :set_prev() method. So that errors can be organized into lists. IProto protocol is extended with new command keys to support this feature as well (gh-1148). Kirill Shcherbatov (1): iproto: refactor error encoding with mpstream Nikita Pettik (5): box: introduce stacked diagnostic area box: use stacked diagnostic area for functional indexes box/error: clarify purpose of reference counting in struct error box: always promote error created via box.error() to diag iproto: support error stacked diagnostic area extra/exports | 1 + src/box/error.cc | 21 +++ src/box/error.h | 16 ++ src/box/iproto_constants.h | 6 + src/box/key_list.c | 12 +- src/box/lua/call.c | 6 +- src/box/lua/error.cc | 13 +- src/box/lua/net_box.lua | 30 ++- src/box/xrow.c | 150 ++++++++++++--- src/lib/core/diag.c | 47 +++++ src/lib/core/diag.h | 111 ++++++++++- src/lib/core/exception.cc | 1 + src/lua/error.lua | 32 ++++ test/box-py/iproto.result | 6 +- test/box-py/iproto.test.py | 6 +- test/box/error.result | 325 ++++++++++++++++++++++++++++++++ test/box/error.test.lua | 120 ++++++++++++ test/box/iproto.result | 142 ++++++++++++++ test/box/iproto.test.lua | 66 +++++++ test/box/net.box.result | 71 +++++++ test/box/net.box.test.lua | 31 +++ test/engine/func_index.result | 54 +++++- test/engine/func_index.test.lua | 8 + test/unit/xrow.cc | 184 +++++++++++++++++- test/unit/xrow.result | 27 ++- 25 files changed, 1424 insertions(+), 62 deletions(-) create mode 100644 test/box/iproto.result create mode 100644 test/box/iproto.test.lua -- 2.17.1
next reply other threads:[~2020-04-06 14:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-06 14:17 Nikita Pettik [this message] 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 1/6] box: introduce stacked diagnostic area Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 2/6] box: use stacked diagnostic area for functional indexes Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 3/6] box/error: clarify purpose of reference counting in struct error Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 4/6] iproto: refactor error encoding with mpstream Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 5/6] box: always promote error created via box.error() to diag Nikita Pettik 2020-04-06 14:17 ` [Tarantool-patches] [PATCH v3 6/6] iproto: support error stacked diagnostic area Nikita Pettik 2020-04-07 11:13 ` [Tarantool-patches] [PATCH v3 0/6] Stacked diagnostics Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1586181413.git.korablev@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 0/6] Stacked diagnostics' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox