Skip to content
Snippets Groups Projects
Commit 8b02c018 authored by Andrey Saranchin's avatar Andrey Saranchin Committed by Vladimir Davydov
Browse files

box: populate port_c with new types

We are going to use ports for triggers. The problem is there is no port
implementation that meets all requirements to be used to pass arguments
to triggers from C, so let's extend existing port_c. This port is
already allows to be dumped several times - let's keep this invariant to
call chains of triggers using only one port.

Let's store trivial types directly, not packed in  MsgPack. Then, we won't
need to make a second mempool allocation to store them and we won't need
to decode them to read.

It's worth noting that port_c has two MsgPack types now - MP and
MP_OBJECT. The first now is a MsgPack packet that will be unpacked on
dump if it's possible. For example, we can pass a field of tuple, which
is a MsgPack packet, to field constraint, and it will be unpacked when
it will be dumped to Lua, so the constraint argument will have a Lua
value, not MsgPack. On the other hand, we want to dump MsgPack as a
MsgPack object sometimes. For instance, we use MsgPack object to pass
request header and body to iproto override handlers and space recovery
triggers.

NO_CHANGELOG=internal
NO_DOC=internal
parent 180383d4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment