Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v6 1/3] replication: omit 0-th vclock component in replication responses
Date: Fri, 10 Apr 2020 01:08:20 +0200	[thread overview]
Message-ID: <e51ede3d-2eb7-2875-63b7-895a9cf33205@tarantool.org> (raw)
In-Reply-To: <ca34b1e162e98a67fe5a9144325400cbb7c35540.1586273440.git.sergepetrenko@tarantool.org>

Hi! Thanks for the patch!

> diff --git a/src/box/xrow.c b/src/box/xrow.c
> index be026a43c..21a68220a 100644
> --- a/src/box/xrow.c
> +++ b/src/box/xrow.c
> @@ -51,7 +51,7 @@ static_assert(IPROTO_DATA < 0x7f && IPROTO_METADATA < 0x7f &&
>  static inline uint32_t
>  mp_sizeof_vclock(const struct vclock *vclock)
>  {
> -	uint32_t size = vclock_size(vclock);
> +	uint32_t size = vclock_size_ignore0(vclock);

This doesn't look right to silently ignore 0 component in a
function, which says nothing about that: mp_sizeof_vclock().
Not in the function name, nor in a comment. Maybe worth renaming
it to mp_sizeof_vclock_ignore0(). Along with mp_encode_vclock().

I am picky to the names, because we still actually have places,
where 0 component *is* needed (we have, right?). And we need to
say explicitly, which places ignore 0, which don't.

Also seems mp_decode_vclock() does not ignore 0. Is it possible
that we will get a connection from tarantool, which still does not
ignore 0 component, and will send it to us? For example, it was
upgraded recently on the latest branch, right before we pushed this
patchset.

>  	return mp_sizeof_map(size) + size * (mp_sizeof_uint(UINT32_MAX) +
>  					     mp_sizeof_uint(UINT64_MAX));
>  }

  reply	other threads:[~2020-04-09 23:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 15:49 [Tarantool-patches] [PATCH v6 0/3] replication: fix local space tracking Serge Petrenko
2020-04-07 15:49 ` [Tarantool-patches] [PATCH v6 1/3] replication: omit 0-th vclock component in replication responses Serge Petrenko
2020-04-09 23:08   ` Vladislav Shpilevoy [this message]
2020-04-10 12:25     ` Serge Petrenko
2020-04-11 16:05       ` Vladislav Shpilevoy
2020-04-13 10:12         ` Serge Petrenko
2020-04-07 15:49 ` [Tarantool-patches] [PATCH v6 2/3] gc: rely on minimal vclock components instead of signatures Serge Petrenko
2020-04-09 23:08   ` Vladislav Shpilevoy
2020-04-10 12:25     ` Serge Petrenko
2020-04-11 16:04       ` Vladislav Shpilevoy
2020-04-13 10:12         ` Serge Petrenko
2020-04-07 15:49 ` [Tarantool-patches] [PATCH v6 3/3] box: start counting local space requests separately Serge Petrenko
2020-04-13 14:38 ` [Tarantool-patches] [PATCH v6 0/3] replication: fix local space tracking Vladislav Shpilevoy
2020-04-16 13:49 ` Kirill Yukhin

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=e51ede3d-2eb7-2875-63b7-895a9cf33205@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v6 1/3] replication: omit 0-th vclock component in replication responses' \
    /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