From: Olga Arkhangelskaia <arkholga@tarantool.org> To: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH rfc 0/1] replication: stop resetting existing connections Date: Thu, 2 Apr 2020 16:29:47 +0300 [thread overview] Message-ID: <20200402132948.12804-1-arkholga@tarantool.org> (raw) Every time we want to change replication configuration even slightly we need to reset all the existing connections and bootstrap replica from every beginning. Such behavior has some shortcomings: https://github.com/tarantool/tarantool/issues/4669 https://github.com/tarantool/tarantool/issues/4668 In this rfc I tried to get rid of extra job and create and delete only those appliers that has to be deleted (no more in cfg file) or to be created (new one). I used straightforward way to check if it is possible and revel all problem that we will face in case we decide to change schema. (And may be add smth like box_add_replica_source or box_remove_replica cllbacks) Quorum problem: In case quorum < total and replica did not get it's UUID (in anon list) replica will stuck in anon list forever. I mean next time we have this source in cfg it will treated as existing one. At the moment I clean anon list every time. Anon problem: While anon - nonanon transition we need to remove anon replica and re-connect it. From config point of view replica exists, so i need to preserve anon state for some time and add such replica to remove array and to new appliers array. Connection to self: Because we only throw away replicas whose sources are in remove array replica with connection to self will assert. I just added special check for self connection while removing replicas from the replicaset. I use applier->source to distinguish whether applier should be created. Another way to solve part of problems caused by #4669 #4668 is too check existing and new configuration for exact match. I need your help to see if I have missed something. And would be happy to read your thoughts and suggestions. Olga Arkhangelskaia (1): replication: stop resetting existing connections src/box/box.cc | 106 +++++++++++++++++++++++++----- src/box/box.h | 1 + src/box/replication.cc | 56 +++++++++++----- src/box/replication.h | 3 +- test/replication/misc.result | 6 ++ test/replication/misc.test.lua | 2 + test/replication/quorum.result | 3 + test/replication/quorum.test.lua | 1 + test/replication/replica_self.lua | 11 ++++ test/replication/self.result | 68 +++++++++++++++++++ test/replication/self.test.lua | 25 +++++++ 11 files changed, 248 insertions(+), 34 deletions(-) create mode 100644 test/replication/replica_self.lua create mode 100644 test/replication/self.result create mode 100644 test/replication/self.test.lua -- 2.20.1 (Apple Git-117)
next reply other threads:[~2020-04-02 13:29 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-02 13:29 Olga Arkhangelskaia [this message] 2020-04-02 13:29 ` [Tarantool-patches] [PATCH rfc 1/1] " Olga Arkhangelskaia 2020-04-02 13:47 ` [Tarantool-patches] [PATCH rfc 0/1] " Konstantin Osipov 2020-04-02 16:05 ` Olga Arkhangelskaia 2020-04-02 16:43 ` Konstantin Osipov
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=20200402132948.12804-1-arkholga@tarantool.org \ --to=arkholga@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH rfc 0/1] replication: stop resetting existing connections' \ /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