[patches] [PATCH 2/2] vinyl: implement space.bsize, index.bsize, and index.len

Konstantin Osipov kostja at tarantool.org
Sat Feb 10 09:40:58 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [18/02/09 15:31]:
> > >  - space.bsize returns the size of data stored in the space.
> > >    It is the sum of memory.bytes and disk.bytes as reported
> > >    by the primary index.
> > 
> > Why is it looking at the primary index only? Shouldn't it take
> > into account all indexes? 
> 
> AFAIU usere want to see how much user data a space stores, hence len and
> bsize return the actual number of rows and their cumulative size. This
> is consistent with memtx.

Somehow it feels wrong. bsize() idea is binary size of the data, not
msgpack size. The reason we don't add tuple memory overhead to
tuple:bsize() because it's incomplete (there are fragmentation
expenses not easily accountable) and useless (what we can account
is fixed size). I think for space:bsize() we need to display
binary size of entire space, both for memtx and vinyl.

> More detailed information can be checked with the aid of index.info().
> 
> > Since this has surfaced as a question, please add a test case.
> 
> OK.

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



More information about the Tarantool-patches mailing list