From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org, georgy@tarantool.org
Cc: alexander.turenko@tarantool.org, kostja@tarantool.org,
Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] [PATCH v3 0/6] box: stacked diagnostics area in fiber
Date: Mon, 2 Sep 2019 17:51:08 +0300 [thread overview]
Message-ID: <cover.1567435674.git.kshcherbatov@tarantool.org> (raw)
Support stacked diagnostics for Tarantool allows to accumulate all
occurred errors during processing a request. This allows to better
understand what has happened and handle errors correspondingly.
This patch introduces core methods diag_add(), diag_svp(),
diag_rollback_to_svp() that allows you to produce a better
diagnostics information for a user.
There is an other new Lua endpoint
box.error.prev() that allows you to get a reason for a given
error object.
Changes in v3:
- fixed Kostya's comments
- implemented iproto support for stacked diagnostics
Changes in v2:
- new API - user shouldn't have an ability to modify an existent
error object that he didn't constructed.
- a new detailed unit-test that performs a good coverage for
many complicated reference-counting scenarios.
Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-1148-stacked-errors
Issue: https://github.com/tarantool/tarantool/issues/1148
Kirill Shcherbatov (6):
box: rfc for stacked diagnostic area in Tarantool
box: rename diag_add_error to diag_set_error
box: introduce stacked diagnostic area
box: extend box.error.new({}) API
iproto: refactor error encoding with mpstream
iproto: support stacked diagnostics for errors
src/box/error.h | 5 +-
src/box/iproto_constants.h | 1 +
src/lib/core/diag.h | 84 +++++++++++-
src/lib/core/exception.h | 2 +-
src/lua/error.h | 3 +
src/box/key_list.c | 16 +--
src/box/lua/call.c | 6 +-
src/box/sql/vdbe.c | 2 +-
src/box/vy_scheduler.c | 6 +-
src/box/xrow.c | 198 +++++++++++++++++++++++-----
src/lib/core/diag.c | 1 +
src/lua/error.c | 2 +-
src/lua/utils.c | 2 +-
test/app-tap/module_api.c | 3 +-
test/box/function1.c | 29 ++--
test/box/reload1.c | 20 +--
test/box/reload2.c | 9 +-
test/box/tuple_bench.c | 10 +-
doc/rfc/1148-stacked-diagnostics.md | 180 +++++++++++++++++++++++++
src/box/applier.cc | 2 +-
src/box/error.cc | 7 +-
src/box/lua/error.cc | 35 ++++-
src/box/lua/net_box.lua | 24 +++-
src/box/relay.cc | 4 +-
src/lib/core/exception.cc | 2 +-
src/lua/error.lua | 12 ++
test/app/fiber.result | 7 +-
test/box-py/iproto.result | 6 +-
test/box-py/iproto.test.py | 6 +-
test/box/misc.result | 159 +++++++++++++++++++++-
test/box/misc.test.lua | 49 +++++++
test/engine/func_index.result | 52 ++++++--
test/engine/func_index.test.lua | 7 +
test/unit/CMakeLists.txt | 2 +-
test/unit/fiber.cc | 157 ++++++++++++++++++++++
test/unit/fiber.result | 60 +++++++++
36 files changed, 1045 insertions(+), 125 deletions(-)
create mode 100644 doc/rfc/1148-stacked-diagnostics.md
--
2.22.1
next reply other threads:[~2019-09-02 14:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 14:51 Kirill Shcherbatov [this message]
2019-09-02 14:51 ` [tarantool-patches] [PATCH v3 1/6] box: rfc for stacked diagnostic area in Tarantool Kirill Shcherbatov
2019-09-09 8:13 ` [tarantool-patches] " Kirill Shcherbatov
2019-09-09 19:44 ` Vladislav Shpilevoy
2019-09-09 19:44 ` Vladislav Shpilevoy
2019-09-02 14:51 ` [tarantool-patches] [PATCH v3 2/6] box: rename diag_add_error to diag_set_error Kirill Shcherbatov
2019-09-02 14:51 ` [tarantool-patches] [PATCH v3 3/6] box: introduce stacked diagnostic area Kirill Shcherbatov
2019-09-02 14:51 ` [tarantool-patches] [PATCH v3 4/6] box: extend box.error.new({}) API Kirill Shcherbatov
2019-09-02 14:51 ` [tarantool-patches] [PATCH v3 5/6] iproto: refactor error encoding with mpstream Kirill Shcherbatov
2019-09-04 10:53 ` [tarantool-patches] " Konstantin Osipov
2019-09-02 14:51 ` [tarantool-patches] [PATCH v3 6/6] iproto: support stacked diagnostics for errors Kirill Shcherbatov
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.1567435674.git.kshcherbatov@tarantool.org \
--to=kshcherbatov@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=georgy@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v3 0/6] box: stacked diagnostics area in fiber' \
/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