[tarantool-patches] Re: [PATCH] box: add tuple:size function

  • From: Alexander Turenko <alexander.turenko@xxxxxxxxxxxxx>
  • To: Konstantin Osipov <kostja@xxxxxxxxxxxxx>
  • Date: Wed, 17 Oct 2018 10:28:10 +0300

On Tue, Oct 16, 2018 at 09:21:44PM +0300, Konstantin Osipov wrote:

* AlexeyIvushkin <ivushkinalex@xxxxxxxxx> [18/09/27 20:57]:
From: Morgan-iv <ivushkinalex@xxxxxxxxx>

When operating with tuples, we only have tuple:bsize function
to get size of tuple. tuple:bsize returns only size of MessagePack
part of struct tuple, without tuple_meta. New function tuple:size
returns size of all tuple, with MessagePack and tuple_meta

Closes #2256

The bug should be fixed as described by Roman.

tuple:bsize() behaviour should be changed to be more accurate,
i.e. return entire binary footprint of a tuple.

No need to introduce a new function.

I don't think it's a "true" incompatible change, the purpose of
bsize() has always been to inform the user about the binary
footprint, so we're simply fixing a bug in the implementation.


Are tuple.bsize and box_tuple_bsize() subjects to change or it is only
about the Lua part?

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov


Other related posts: