Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Cc: v.shpilevoy@tarantool.org
Subject: [Tarantool-patches] [PATCH v2 00/10] Stacked diagnostics
Date: Wed, 25 Mar 2020 04:42:56 +0300	[thread overview]
Message-ID: <cover.1585097339.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/4778

Patch-set basically consists of two parts: first one fixes undocumented
behaviour of box.error.new() which sets created error to diagnostics
area. The reason why it is required is described in the corresponding
github ticked. Second part is about stacked diagnostics itself: patch
error structure extending it with double linked list, provide Lua and
C interfaces to interact with it, support stacked diagnostics in IProto
protocol and net.box module (all points according to the rfc: 
https://github.com/tarantool/tarantool/commit/1acd32d98f628431429b427df19caa9d269bb9c8).

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.

@ChangeLog
* box.error.new() does not longer add created error to Tarantool's diagnostic
area (gh-4778)
* 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 (3):
  box: rfc for stacked diagnostic area
  box: rename diag_add_error to diag_set_error
  iproto: refactor error encoding with mpstream

Nikita Pettik (7):
  test: move box.error tests to box/error.test.lua
  box/error: introduce box.error.set() method
  box/error: don't set error created via box.error.new to diag
  box: introduce stacked diagnostic area
  box: use stacked diagnostic area for functional indexes
  box/error: clarify purpose of reference counting in struct error
  iproto: support error stacked diagnostic area

 doc/rfc/1148-stacked-diagnostics.md | 225 ++++++++
 extra/exports                       |   1 +
 src/box/applier.cc                  |   2 +-
 src/box/error.cc                    |  33 ++
 src/box/error.h                     |  24 +
 src/box/iproto_constants.h          |   6 +
 src/box/key_list.c                  |  16 +-
 src/box/lua/call.c                  |   6 +-
 src/box/lua/error.cc                |  70 ++-
 src/box/lua/net_box.lua             |  32 +-
 src/box/relay.cc                    |   4 +-
 src/box/vy_scheduler.c              |   6 +-
 src/box/xrow.c                      | 158 +++++-
 src/lib/core/diag.c                 |  39 ++
 src/lib/core/diag.h                 | 111 +++-
 src/lib/core/exception.cc           |   3 +-
 src/lib/core/exception.h            |   2 +-
 src/lua/error.c                     |   2 +-
 src/lua/error.h                     |   3 +
 src/lua/error.lua                   |  32 ++
 src/lua/utils.c                     |   2 +-
 test/box-py/iproto.result           |   6 +-
 test/box-py/iproto.test.py          |   6 +-
 test/box/error.result               | 791 ++++++++++++++++++++++++++++
 test/box/error.test.lua             | 216 ++++++++
 test/box/iproto.result              | 141 +++++
 test/box/iproto.test.lua            |  62 +++
 test/box/misc.result                | 423 ---------------
 test/box/misc.test.lua              |  80 ---
 test/box/net.box.result             |  60 +++
 test/box/net.box.test.lua           |  23 +
 test/engine/func_index.result       |  50 +-
 test/engine/func_index.test.lua     |   7 +
 33 files changed, 2042 insertions(+), 600 deletions(-)
 create mode 100644 doc/rfc/1148-stacked-diagnostics.md
 create mode 100644 test/box/error.result
 create mode 100644 test/box/error.test.lua
 create mode 100644 test/box/iproto.result
 create mode 100644 test/box/iproto.test.lua

-- 
2.17.1

             reply	other threads:[~2020-03-25  1:43 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  1:42 Nikita Pettik [this message]
2020-03-25  1:42 ` [Tarantool-patches] [PATCH v2 01/10] box: rfc for stacked diagnostic area Nikita Pettik
2020-03-25  8:27   ` Konstantin Osipov
2020-03-25 14:08     ` Nikita Pettik
2020-03-25  1:42 ` [Tarantool-patches] [PATCH v2 02/10] box: rename diag_add_error to diag_set_error Nikita Pettik
2020-03-25  8:27   ` Konstantin Osipov
2020-03-26  0:22   ` Vladislav Shpilevoy
2020-03-26 12:31     ` Nikita Pettik
2020-03-25  1:42 ` [Tarantool-patches] [PATCH v2 03/10] test: move box.error tests to box/error.test.lua Nikita Pettik
2020-03-25  8:28   ` Konstantin Osipov
2020-03-26  0:22   ` Vladislav Shpilevoy
2020-03-26 12:31     ` Nikita Pettik
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 04/10] box/error: introduce box.error.set() method Nikita Pettik
2020-03-25  8:33   ` Konstantin Osipov
2020-03-25 17:41     ` Nikita Pettik
2020-03-26  0:22   ` Vladislav Shpilevoy
2020-03-26 12:31     ` Nikita Pettik
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 05/10] box/error: don't set error created via box.error.new to diag Nikita Pettik
2020-03-26 16:50   ` Konstantin Osipov
2020-03-26 17:59     ` Nikita Pettik
2020-03-26 18:06       ` Nikita Pettik
2020-03-26 18:07       ` Alexander Turenko
2020-03-27  0:19   ` Vladislav Shpilevoy
2020-03-27 13:09     ` Nikita Pettik
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 06/10] box: introduce stacked diagnostic area Nikita Pettik
2020-03-26 16:54   ` Konstantin Osipov
2020-03-26 18:03     ` Nikita Pettik
2020-03-26 18:08       ` Konstantin Osipov
2020-03-28 18:40   ` Vladislav Shpilevoy
2020-04-01 16:09     ` Nikita Pettik
2020-04-02  0:29       ` Vladislav Shpilevoy
2020-04-02 17:42         ` Nikita Pettik
2020-04-02 22:20           ` Vladislav Shpilevoy
2020-04-03  1:54             ` Nikita Pettik
2020-04-03 23:17               ` Vladislav Shpilevoy
2020-03-28 18:59   ` Vladislav Shpilevoy
2020-03-31 17:44     ` Nikita Pettik
2020-04-02  0:29       ` Vladislav Shpilevoy
2020-04-02 14:16         ` Nikita Pettik
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 07/10] box: use stacked diagnostic area for functional indexes Nikita Pettik
2020-03-30 23:24   ` Vladislav Shpilevoy
2020-04-01 15:53     ` Nikita Pettik
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 08/10] box/error: clarify purpose of reference counting in struct error Nikita Pettik
2020-03-30 23:24   ` Vladislav Shpilevoy
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 09/10] iproto: refactor error encoding with mpstream Nikita Pettik
2020-03-30 23:24   ` Vladislav Shpilevoy
2020-04-01 15:54     ` Nikita Pettik
2020-03-25  1:43 ` [Tarantool-patches] [PATCH v2 10/10] iproto: support error stacked diagnostic area Nikita Pettik
2020-03-30 23:24   ` Vladislav Shpilevoy
2020-04-01 16:26     ` Nikita Pettik
2020-04-01 22:24       ` Nikita Pettik
2020-04-02  0:29         ` Vladislav Shpilevoy
2020-04-02 14:01           ` Nikita Pettik
2020-04-02 22:20             ` Vladislav Shpilevoy
2020-04-03  2:16               ` Nikita Pettik
2020-04-03 23:17                 ` Vladislav Shpilevoy
2020-04-06 11:07                   ` Nikita Pettik

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.1585097339.git.korablev@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 00/10] 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