[Tarantool-patches] [PATCH 1/1] box: export box_session_push to the public C API

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Jan 21 02:14:15 MSK 2020


Alexander noticed that the patch crashes when C push
works from console. I am going to fix this by dumping
pushed data in the same way as with Lua pushes - decode
the data into YAML and return as a string.

If nobody has something against this.

Talking of YAML vs Lua output format - I am not going
to fix this in scope of this issue.

On 20/01/2020 23:16, Vladislav Shpilevoy wrote:
> It was a customer request. Nothing special here, the patch is
> trivial, with a couple of short notes:
> 
> 1) Sync argument was removed. It will disappear from Lua API as
>   well, according to #4689. Port is replaced with raw MessagePack,
>   because port is not a part of public API. Session is omitted as
>   well. Indeed, a user can't push to a foreign session, and the
>   current session can be obtained inside box_session_push(). And
>   anyway session is not in the public C API.
> 
> 2) Dump is done using obuf_dup(), just like tuple_to_obuf() does.
>   obuf_alloc() would be a bad call here, because it wouldn't be
>   able to split the pushed data into several obuf chunks, and
>   would cause obuf fragmentation.
> 
> Closes #4734
> ---
> Issue: https://github.com/tarantool/tarantool/issues/4734
> Branch: https://github.com/tarantool/tarantool/tree/gerold103/gh-4734-export-box-session-push
> 


More information about the Tarantool-patches mailing list