Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH 6/6] Introduce blackhole engine
Date: Mon, 23 Jul 2018 14:02:23 +0300	[thread overview]
Message-ID: <20180723110223.amuv2i4op3yh63u2@esperanza> (raw)
In-Reply-To: <20180721123531.zzxiq2e2cnkt3wnt@esperanza>

On Sat, Jul 21, 2018 at 03:35:31PM +0300, Vladimir Davydov wrote:
> > Please document how it could be used for logical replication.
> 
> Will do.

Come to think of it, using a blackhole space for replicating CALLs with
the weaponry we have at hand isn't as simple as I thought it would be.
The problem is we need to receive the snapshot when a replica is joined,
but then unsubscribe from all changes except those done to the blackhole
space that is used for logging CALLs. That is, we can't just mark all
spaces except DD as replica local, because they won't be sent in a
snapshot then. The only solution I can come up with now is using
before_replace trigger for filtering out DML requests received from the
master, but this isn't the best practice, because before_replace trigger
is somewhat slow.

If we had replication groups things would be different though. Logical
replication would consist of the following steps then:

1. Create a new replication group on the master. Use the new group for
   creating all user spaces.
2. Create a blackhole space for logging CALLs. Do NOT include it in the
   new replication group (mark it global).
3. Join a replica to the master as a member of the replication group
   created on step 1 so that it receives the whole user data set in a
   snapshot.
4. Stop replication temporarily.
5. Install a trigger on the space used for logging CALLs.
6. Remove the replica from the replication group so that it won't
   receive any changes from the master except CALL log and resume
   replication.

   (ideally, the process should be automated by tarantool as much as
   possible)

That said, I don't think it's worth exposing blackhole to the user until
we have replication groups and some guidelines for logical replication.
What about leaving blackhole undocumented for now to prevent users from
abusing it in ways that we haven't thought through?

  reply	other threads:[~2018-07-23 11:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 17:43 [PATCH 0/6] " Vladimir Davydov
2018-07-20 17:43 ` [PATCH 1/6] Add generic engine, space, index method stubs Vladimir Davydov
2018-07-20 17:56   ` Konstantin Osipov
2018-07-21 12:24   ` Vladimir Davydov
2018-07-20 17:43 ` [PATCH 2/6] Merge sysview_index.[hc] and sysview_engine.[hc] Vladimir Davydov
2018-07-20 18:02   ` Konstantin Osipov
2018-07-21 12:24   ` Vladimir Davydov
2018-07-20 17:43 ` [PATCH 3/6] Rework memtx replace function Vladimir Davydov
2018-07-20 18:04   ` Konstantin Osipov
2018-07-21 12:24   ` Vladimir Davydov
2018-07-20 17:43 ` [PATCH 4/6] txn: unify txn_stmt tuples reference counting rules Vladimir Davydov
2018-07-20 18:31   ` Konstantin Osipov
2018-07-21 12:24   ` Vladimir Davydov
2018-07-20 17:43 ` [PATCH 5/6] space: call before_replace trigger even if space has no indexes Vladimir Davydov
2018-07-20 18:39   ` Konstantin Osipov
2018-07-21 12:26     ` Vladimir Davydov
2018-07-21 20:59       ` Konstantin Osipov
2018-07-23 10:15         ` Vladimir Davydov
2018-07-20 17:43 ` [PATCH 6/6] Introduce blackhole engine Vladimir Davydov
2018-07-20 18:42   ` Konstantin Osipov
2018-07-21 12:35     ` Vladimir Davydov
2018-07-23 11:02       ` Vladimir Davydov [this message]
2018-07-23 12:53         ` Vladimir Davydov
2018-07-23 18:30 ` [PATCH 0/6] " 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=20180723110223.amuv2i4op3yh63u2@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH 6/6] Introduce blackhole engine' \
    /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