Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Sergey Petrenko" <sergepetrenko@tarantool.org>
To: "Vladislav Shpilevoy" <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 4/5] vclock: ignore 0th component in comparisons.
Date: Sat, 28 Dec 2019 14:21:19 +0300	[thread overview]
Message-ID: <1577532079.608632936@f476.i.mail.ru> (raw)
In-Reply-To: <71750f3d-6093-a70a-0c02-34759576eb84@tarantool.org>

[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]


>Пятница, 27 декабря 2019, 21:42 +03:00 от Vladislav Shpilevoy <v.shpilevoy@tarantool.org>:
>
>I've just noticed that we have '.' in the end of the commit
>title. I dropped it force pushed this commit, as an obvious
>fix.
>
>Also see some other changes below. They are pushed on top of
>this commit. Squash if you agree. Or change it, if I miss
>something.
Hi! Looks good, thanks. Squashed.
>
>
>================================================================================
>
>commit 77455d8aeb1f5f26920bbc6d213b9d32edcfd6bb
>Author: Vladislav Shpilevoy < v.shpilevoy@tarantool.org >
>Date:   Fri Dec 27 19:08:54 2019 +0300
>
>    Review fix 4/5
>
>diff --git a/src/box/vclock.h b/src/box/vclock.h
>index e1625410e..eb0fb5d8b 100644
>--- a/src/box/vclock.h
>+++ b/src/box/vclock.h
>@@ -266,7 +266,10 @@ enum { VCLOCK_ORDER_UNDEFINED = INT_MAX };
>  * \brief Compare vclocks
>  * \param a vclock
>  * \param b vclock
>- * \param ignore_zero Whether to order by 0-th component or not
>+ * \param ignore_zero Whether to order by 0-th component or not.
>+ *        The 0 component is ignored on anonymous replicas when
>+ *        they apply rows from remote master. Because anon
>+ *        replicas use the component for local purposes.
>  *
>  * \retval 1 if \a vclock is ordered after \a other
>  * \retval -1 if \a vclock is ordered before than \a other
>@@ -275,7 +278,7 @@ enum { VCLOCK_ORDER_UNDEFINED = INT_MAX };
>  */
> static inline int
> vclock_compare_generic(const struct vclock *a, const struct vclock *b,
>-	       bool ignore_zero)
>+		       bool ignore_zero)
> {
> 	bool le = true, ge = true;
> 	unsigned int map = a->map | b->map;
>@@ -283,11 +286,6 @@ vclock_compare_generic(const struct vclock *a, const struct vclock *b,
> 	bit_iterator_init(&it, &map, sizeof(map), true);
>
> 	size_t replica_id = bit_iterator_next(&it);
>-	/*
>-	 * Ignore 0-th component in comparisons.
>-	 * It is empty for normal replicas and should
>-	 * be ignored for anonymous ones.
>-	 */
> 	if (replica_id == 0 && ignore_zero)
> 		replica_id = bit_iterator_next(&it);
>


-- 
Sergey Petrenko

[-- Attachment #2: Type: text/html, Size: 2972 bytes --]

  reply	other threads:[~2019-12-28 11:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25 12:46 [Tarantool-patches] [PATCH v2 0/5] introduce anonymous replicas sergepetrenko
2019-12-25 12:46 ` [Tarantool-patches] [PATCH v2 1/5] box: update comment describing join protocol sergepetrenko
2019-12-25 12:46 ` [Tarantool-patches] [PATCH v2 2/5] replication: do not decode replicaset uuid when processing a subscribe sergepetrenko
2019-12-25 12:47 ` [Tarantool-patches] [PATCH v2 3/5] applier: split join processing into two stages sergepetrenko
2019-12-25 12:47 ` [Tarantool-patches] [PATCH v2 4/5] vclock: ignore 0th component in comparisons sergepetrenko
2019-12-25 16:00   ` Vladislav Shpilevoy
2019-12-27 18:42   ` Vladislav Shpilevoy
2019-12-28 11:21     ` Sergey Petrenko [this message]
2019-12-25 12:47 ` [Tarantool-patches] [PATCH v2 5/5] replication: introduce anonymous replica sergepetrenko
2019-12-25 18:22   ` Vladislav Shpilevoy
2019-12-27 15:27     ` Sergey Petrenko
2019-12-27 18:42       ` Vladislav Shpilevoy
2019-12-28 11:48         ` Sergey Petrenko
2019-12-28 12:15           ` Vladislav Shpilevoy
2019-12-30  5:12 ` [Tarantool-patches] [PATCH v2 0/5] introduce anonymous replicas 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=1577532079.608632936@f476.i.mail.ru \
    --to=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 4/5] vclock: ignore 0th component in comparisons.' \
    /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