Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Leonid Vasiliev <lvasiliev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH V4 4/6] error: add session setting for error type marshaling
Date: Thu, 16 Apr 2020 22:48:35 +0300	[thread overview]
Message-ID: <20200416194835.GA3623@atlas> (raw)
In-Reply-To: <9ad134f42e6b11bf030f80d90435aac512db0784.1587058424.git.lvasiliev@tarantool.org>

* Leonid Vasiliev <lvasiliev@tarantool.org> [20/04/16 20:45]:
> Errors are encoded as a string when serialized to MessagePack to
> be sent over IProto or when just saved into a buffer via Lua
> modules msgpackffi and msgpack.
> 
> That is not very useful on client-side, because most of the error
> metadata is lost: code, type, trace - everything except the
> message.
> 
> Next commits are going to dedicate a new MP_EXT type to error
> objects so as everything could be encoded, and on client side it
> would be possible to restore types.
> 
> But this is a breaking change in case some users use old
> connectors when work with newer Tarantool instances. So to smooth
> the upgrade there is a new session setting -
> 'error_marshaling_enabled'.
> 
> By default it is false. When it is true, all fibers of the given
> session will serialize error objects as MP_EXT.

I don't understand the point of having an MP_EXT if the same
can be achieved with simply a new messagepack key. There is
already IPROTO_ERROR_CODE, IPROTO_ERROR_MESSAGE, why can't you add
IPROTO_ERROR_TYPE? 

And since this is a protocol change, there should have been (a
short?) RFC for it.

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2020-04-16 19:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 17:38 [Tarantool-patches] [PATCH V4 0/6] Extending error functionality Leonid Vasiliev
2020-04-16 17:38 ` [Tarantool-patches] [PATCH V4 1/6] error: add custom error type Leonid Vasiliev
2020-04-17  0:49   ` Vladislav Shpilevoy
2020-04-18 17:14     ` lvasiliev
2020-04-16 17:38 ` [Tarantool-patches] [PATCH V4 2/6] error: send custom type in IProto Leonid Vasiliev
2020-04-17  0:51   ` Vladislav Shpilevoy
2020-04-16 17:38 ` [Tarantool-patches] [PATCH V4 3/6] session: add offset to SQL session settings array Leonid Vasiliev
2020-04-16 17:38 ` [Tarantool-patches] [PATCH V4 4/6] error: add session setting for error type marshaling Leonid Vasiliev
2020-04-16 19:48   ` Konstantin Osipov [this message]
2020-04-17  0:51     ` Vladislav Shpilevoy
2020-04-17  7:35       ` Konstantin Osipov
2020-04-16 17:38 ` [Tarantool-patches] [PATCH V4 5/6] error: update constructors of some errors Leonid Vasiliev
2020-04-16 17:38 ` [Tarantool-patches] [PATCH V4 6/6] error: add error MsgPack encoding Leonid Vasiliev
2020-04-17  0:58   ` Vladislav Shpilevoy
2020-04-18 17:46     ` lvasiliev
2020-04-17  0:51 ` [Tarantool-patches] [PATCH V4 0/6] Extending error functionality Vladislav Shpilevoy

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=20200416194835.GA3623@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH V4 4/6] error: add session setting for error type marshaling' \
    /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