Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Konstantin Osipov <kostja.osipov@gmail.com>,
	Leonid Vasiliev <lvasiliev@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH V4 4/6] error: add session setting for error type marshaling
Date: Fri, 17 Apr 2020 02:51:54 +0200	[thread overview]
Message-ID: <4ff74326-f83d-599d-fcda-c7d8175c9263@tarantool.org> (raw)
In-Reply-To: <20200416194835.GA3623@atlas>

Hi!

On 16/04/2020 21:48, Konstantin Osipov wrote:
> * 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? 

Seems like you are talking about the case when error object is
thrown as an exception. But the patchset is about being able to
recognize and decode errors even when they are returned inside
response body, as a part of IPROTO_OK response type.

  reply	other threads:[~2020-04-17  0:51 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
2020-04-17  0:51     ` Vladislav Shpilevoy [this message]
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=4ff74326-f83d-599d-fcda-c7d8175c9263@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja.osipov@gmail.com \
    --cc=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.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