From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4A5FF46970E for ; Tue, 21 Jan 2020 02:14:17 +0300 (MSK) From: Vladislav Shpilevoy References: <1065f691482e681b779abd3698ec4489267c11fd.1579558507.git.v.shpilevoy@tarantool.org> Message-ID: Date: Tue, 21 Jan 2020 00:14:15 +0100 MIME-Version: 1.0 In-Reply-To: <1065f691482e681b779abd3698ec4489267c11fd.1579558507.git.v.shpilevoy@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/1] box: export box_session_push to the public C API List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, kostja.osipov@gmail.com, alexander.turenko@tarantool.org 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 >