Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 1/1] box: export box_session_push to the public C API
Date: Tue, 14 Apr 2020 10:54:49 +0300	[thread overview]
Message-ID: <20200414075449.6naawxqaj37jtz37@tarantool.org> (raw)
In-Reply-To: <e2bc28149fb628dded1a9b1bd42180fa59b64e82.1586301544.git.v.shpilevoy@tarantool.org>

Hello,

On 08 Apr 01:20, Vladislav Shpilevoy wrote:
> API is different from box.session.push() - sync argument was
> removed. It will disappear from Lua API as well, because it just
> is not needed here. 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.
> 
> Internally dump into iproto 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.
> 
> Dump into plain text behaves just like a Lua push - it produces a
> YAML formatted text or Lua text depending on output format. But to
> turn MessagePack into YAML or Lua text an intermediate Lua
> representation is used, because there are no a MessagePack -> YAML
> and MessagePack -> Lua text translators yet.
> 
> Closes #4734
> 
> @TarantoolBot document
> Title: box_session_push() C API
> 
> There is a new function in the public C API:
> ```C
>     int
>     box_session_push(const char *data, const char *data_end);
> ```
> 
> It takes raw MessagePack, and behaves just like Lua
> `box.session.push()`.
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4734-export-box-session-push
> Issue: https://github.com/tarantool/tarantool/issues/4734

I've checked your patch into master.

--
Regards, Kirill Yukhin

      parent reply	other threads:[~2020-04-14  7:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 23:20 Vladislav Shpilevoy
2020-04-08 15:33 ` Igor Munkin
2020-04-08 20:35   ` Vladislav Shpilevoy
2020-04-11  9:38     ` Igor Munkin
2020-04-11 18:11       ` Vladislav Shpilevoy
2020-04-11 18:11         ` Igor Munkin
2020-04-12 14:15           ` Vladislav Shpilevoy
2020-04-14  7:54 ` Kirill Yukhin [this message]

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=20200414075449.6naawxqaj37jtz37@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 1/1] box: export box_session_push to the public C API' \
    /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