From: Konstantin Osipov <kostja.osipov@gmail.com> To: Georgy Kirichenko <kirichenkoga@gmail.com> Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Subject: Re: [Tarantool-patches] [PATCH v3 0/4] replication: fix applying of rows originating from local instance Date: Mon, 24 Feb 2020 13:18:48 +0300 [thread overview] Message-ID: <20200224101848.GE18378@atlas> (raw) In-Reply-To: <9655697.nUPlyArG6x@localhost> * Georgy Kirichenko <kirichenkoga@gmail.com> [20/02/23 12:21]: > Please do not think you are the only person who knows about byzantine faults. > Also there is little relevance between byzantine faults and my suggestion to > enforce replica-side checking. You've been suggesting that filtering on the master is safer. I pointed out it's not, there is no way to guarantee (even in theory) correctness/safety if replica if master is malfunctioning. I merely pointed out that your safety argument has no merit. There are no other practical advantages of filtering on replica either: there is a disadvantage, more traffic and more filtering work to do inside tx thread (as opposed to relay/wal thread if done on master). It is also against the current responsibilities of IPROTO_SUBSCRIBE: the concept of a subscription is that replica specifies what it is interested in. Specifically, it specifies vclock components it's. You suggest to make the replica responsible for submitting its vclock, but the master decide what to do with it - this splits the decision making logic between the two, making the whole thing harder to understand. IPROTO_SUBSCRIBE responsibility layout today is typical for a request-response protocol: the master, being the server, executes the command as specified by the client (the replica), and the replica runs the logic to decide what command to issue. You suggest to change it because of some theoretical concerns you have. > In any case filtering on the master side is the most worst thing we could do. > In this case master has only one peer and have no chance to make a proper > decision if replica is broken. And we have no chance to know about it (except > assert which are excluded from release builds, or panic messages). For > instance if master skipped some rows then there are no any tracks of the > situation we could detect. The situation is symmetrical. Both peers do not have the whole picture. You can make either of the peers responsible for the decision, then the other peer will need to supply the missing bits. There is no way you can make it safer by changing who makes the decision, but you can certainly make it more messed up by splitting this logic or going against an established layout. If you have a specific example why things will improve if done otherwise - in the number of packets, or traffic, or some other measurable way, you should point it out. > In the opposite case a replica could connect to as many masters as they need > to filter out all invalid data or hacked masters. At least we could enforce > replication stream meta checking. I do not think the scope of this issue has ever been protecting against hacked masters. It has never been a goal of the protocol either. > Two major point I would like to mention are: > 1. Replica could consistently follow all vclock members and apply all > transactions without gaps (I already got rid of them, I hope you remember) > 2. Replica could protect itself against concurrent local writes (one was made > locally, the second one is returned from master) This was added for specific reasons. There is no known reason the master should send unnecessary data to replica or replica fast path should get slower. -- Konstantin Osipov, Moscow, Russia https://scylladb.com
next prev parent reply other threads:[~2020-02-24 10:18 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-18 17:37 Serge Petrenko 2020-02-18 17:37 ` [Tarantool-patches] [PATCH v3 1/4] box: expose box_is_orphan method Serge Petrenko 2020-02-18 17:37 ` [Tarantool-patches] [PATCH v3 2/4] recovery: allow to ignore rows coming from a certain instance Serge Petrenko 2020-02-18 19:03 ` Konstantin Osipov 2020-02-19 8:43 ` Serge Petrenko 2020-02-19 8:52 ` Konstantin Osipov 2020-02-19 8:57 ` Serge Petrenko 2020-02-19 9:02 ` Konstantin Osipov 2020-02-19 9:35 ` Serge Petrenko 2020-02-19 10:11 ` Konstantin Osipov 2020-02-19 10:31 ` Serge Petrenko 2020-02-19 11:27 ` Konstantin Osipov 2020-02-18 17:37 ` [Tarantool-patches] [PATCH v3 3/4] replication: do not relay rows coming from a remote instance back to it Serge Petrenko 2020-02-18 19:07 ` Konstantin Osipov 2020-02-18 17:37 ` [Tarantool-patches] [PATCH v3 4/4] wal: warn when trying to write a record with a broken lsn Serge Petrenko 2020-02-22 20:21 ` [Tarantool-patches] [PATCH v3 0/4] replication: fix applying of rows originating from local instance Georgy Kirichenko 2020-02-22 20:49 ` Konstantin Osipov 2020-02-23 8:16 ` Georgy Kirichenko 2020-02-24 10:18 ` Konstantin Osipov [this message] 2020-02-24 12:31 ` Георгий Кириченко 2020-02-26 10:09 ` Sergey Petrenko
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=20200224101848.GE18378@atlas \ --to=kostja.osipov@gmail.com \ --cc=kirichenkoga@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 0/4] replication: fix applying of rows originating from local instance' \ /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