[Tarantool-patches] [tarantool-patches] Re: [PATCH v2 2/4] wal: wal memory buffer

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Oct 22 02:04:12 MSK 2019


>>>>>> +	/* Decoded xrow header. */
>>>>>> +	struct xrow_header xrow;
>>>>>> +	/* Pointer to the xrow encoded raw data. */
>>>>>> +	void *data;
>>>>>> +	/* xrow raw data size. */
>>>>>> +	size_t size;
>>>>>> +};
>>>>>> +
>>>>>> +/*
>>>>>> + * Xrow memory data chunk info contains
>>>>>> + *  a vclock just before the first stored row,
>>>>>> + *  an ibuf with row descriptors
>>>>>> + *  an obuf with encoded data
>>>>>
>>>>> 29. I don't think it really makes sense to just dupicate here
>>>>> the comments of each attribute of the structure. Please,
>>>>> better use that space to explain, why you need vclock, why
>>>>> 'before first row' instead of just 'first row', or 'last row'.
>>>>>
>>>>> What is a 'row descriptor'?
>>>>>
>>>>> Why do you need both initial xrows and encoded? I thought, that
>>>>> xrow_buf stores only encoded rows.
>>>>
>>>> Relay will need initial xrows to perform filtering (replication group, lsn
>>>> and e.t.c.) without xrow encoded body to decode.
>>>
>>> Hm, it looks quite expensive just for filtering. But assume it is ok.
>>> 1) Why can't you store only a header instead of the whole xrow with a
>>> body? As I understand, for any filtering the header is enough. Or not?
>> I should also store xrow bodies and then encode the xrow as many times as 
>> count of replicas I have.
> 
> Why do you need to encode it multiple times? Why not to send the same
> encoded record?
> Also, I don't see where do you encode more than once.
> 

Please, say anything. I still don't understand it.


More information about the Tarantool-patches mailing list