Skip to content

Document IPROTO_FEATURE_ERROR_EXTENSION #2416

Open
@Totktonada

Description

@Totktonada

Product: Tarantool
Since: 2.10.0-beta2
Audience/target: developers
Root document: https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/
SME:* @ locker

Details

A new feature bit for the IPROTO_ID command was added:

IPROTO_FEATURE_ERROR_EXTENSION = 2 

The protocol version was incremented - now it equals 2.

If a network client sets this bit, errors returned by CALL/EVAL will be
encoded as the MP_ERROR MsgPack extension (unless disabled globally by
msgpack.cfg.encode_error_as_ext). If the bit is unset, errors will be
encoded according to the serialization rules used for generic cdata
objects (converted to strings by default).

The built-in net.box connector sets this feature bit.

The server sets this feature bit if it supports the MP_ERROR MsgPack
extension so a net.box client can explicitly request the feature upon
connecting to a server:

net.box.connect(uri, {required_protocol_features = {'error_extension'}})

Requested by @locker in tarantool/tarantool@342f601

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.10errorsfeatureA new functionalityiprotoRelated to the iproto protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions