From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Olga Arkhangelskaia <arkholga@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] Re: [PATCH v2] replication: fix assertion with duplicated connect to same master
Date: Sat, 22 Sep 2018 19:21:43 +0300 [thread overview]
Message-ID: <20180922162143.lmfywwcchzfw35ms@esperanza> (raw)
In-Reply-To: <85617ed6-0cc4-c354-dd62-7a84b9feae70@tarantool.org>
[Please don't drop the mailing list from Cc]
On Sat, Sep 22, 2018 at 10:04:57AM +0300, Olga Arkhangelskaia wrote:
> *
>
> Hi! Thanks for the review. I will fix most of the comments and observations.
>
> However, I guess I need to know that we are on the same page.
>
> When we do box.cfg{replication={44441, 44441}}
>
> we have two replicas, each one has its onw applier, etc. In
> replicaset_update()we are able to
>
> identify that the replicas are same. At this point we raise exceptions.
> Problem occurs when we try to delete the second one. For proper deletion we
> need to stop applier, clear it and than delete replica. As I understand we
> need to:
>
> applier_stop(replica->applier);
>
> replica_clear_applier(replica);replica_delete(replica);
If you change the call sequence to
replica_clear_applier(replica);
replica_delete(replica);
applier_stop(replica->applier);
you won't be facing this problem.
>
> The reason I added replica_on_applier_off(replica) is because when an
> applier enters stopped state, it state marks as APPLIER_OFF. Trigger on
> change states reacts on this change with
>
> replica_on_applier_state_f. That leads us to on_applier_sync. Instead we
> should react on APPLIER_DISCONNECTED. And the only way we react on this
> state - is to try to load applier again.
>
> So replica_on_applier_off is used in case when we want to stop applier
> forever, before replica deletion. I think we do need this function. May be
> in some other form that I did.
prev parent reply other threads:[~2018-09-22 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 7:11 [tarantool-patches] " Olga Arkhangelskaia
2018-09-17 15:05 ` Vladimir Davydov
[not found] ` <85617ed6-0cc4-c354-dd62-7a84b9feae70@tarantool.org>
2018-09-22 16:21 ` Vladimir Davydov [this message]
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=20180922162143.lmfywwcchzfw35ms@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=arkholga@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] Re: [PATCH v2] replication: fix assertion with duplicated connect to same master' \
/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