Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/1] replication: set replica ID before _cluster commit
Date: Tue, 27 Jul 2021 15:13:05 +0300	[thread overview]
Message-ID: <YP/4UZ1LJtThLu10@grain> (raw)
In-Reply-To: <eb7ff69dc5d7cec375d13ac65cf186cf56e92e16.1627230335.git.v.shpilevoy@tarantool.org>

On Sun, Jul 25, 2021 at 06:53:02PM +0200, Vladislav Shpilevoy wrote:
> Replica registration works via looking for the smallest not
> occupied ID in _cluster and inserting it into the space.
> It works not so good when mvcc is enabled. In particular, if more
> than 1 replica try to register at the same time, they might get
> the same replica_id because don't see changes of each other until
> the registration in _cluster is complete.
> This in the end leads to all replicas failing the registration
> except one with the 'duplicate key' error (primary index in
> _cluster is replica ID).
> The patch makes the replicas occupy their ID before they commit it
> into _cluster. And new replica ID search now uses the replica ID
> map instead of _cluster iterator.
> This way the registration works like before - like MVCC does not
> exist which is fine.
> Part of #5430

I don't see any obvious problems in the patch, so Ack.

  parent reply	other threads:[~2021-07-27 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-25 16:53 Vladislav Shpilevoy via Tarantool-patches
2021-07-25 18:31 ` Sergey Petrenko via Tarantool-patches
2021-07-26 22:06   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-27 12:13 ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-07-27 15:10 ` Sergey Ostanevich via Tarantool-patches
2021-07-27 21:53   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-28 22:20     ` Sergey Ostanevich via Tarantool-patches
2021-07-29 21:42 ` Vladislav Shpilevoy via Tarantool-patches

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YP/4UZ1LJtThLu10@grain \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] replication: set replica ID before _cluster commit' \


* 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