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: Sat, 21 Jul 2018 15:35:31 +0300	[thread overview]
Message-ID: <20180721123531.zzxiq2e2cnkt3wnt@esperanza> (raw)
In-Reply-To: <20180720184247.GG4827@chai>

On Fri, Jul 20, 2018 at 09:42:47PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev@gmail.com> [18/07/20 20:45]:
> > Blackhole is a very simple engine that allows to create spaces that may
> > written to, but not read from. It only supports INSERT/REPLACE requests.
> > It doesn't support any indexes hence SELECT is impossible. It does check
> > space format though and supports on_replace and before_replace triggers.
> 
> Allowing DELETE requests could be practical in the future.

True. E.g. MySQL uses the blackhole engine for implementing a kind of
replication filters:

  https://dev.mysql.com/doc/refman/8.0/en/blackhole-storage-engine.html

Using the blackhole engine like that would require supporting all
available DML requests. However, implementing DELETE/UPDATE implies
index support, which is beyond the scope of this patch. We may do it
later if we need to.

> > 
> > The whole purpose of this new engine is writing arbitrary rows to WAL
> > without storing them anywhere. In particular, we need this engine to
> > write deferred DELETEs generated for vinyl spaces to WAL.
> 
> This is OK to push.
> > 
> > Needed for #2129
> > 
> > @TarantoolBot document
> > Title: Document blackhole engine
> > Spaces created with blackhole engine may be written to, but not read
> > from (they don't even support space.create_index command). Operations
> > done on a blackhole space are written to WAL and hence get replicated,
> > but not stored anywhere else.
> 
> The docbot comment is insufficient. Please describe the effect of
> adding triggers to this engine. It should be OK to mix this
> engine with others in transaction - please could write a follow
> up which allows this? 

I prepared a patch that allows to mix sysview requests in other engines'
transactions, see

  https://www.freelists.org/post/tarantool-patches/PATCH-tx-exclude-sysview-engine-from-transaction-control

Please take a look at it. If it's OK, then all we'll need to do is set
ENGINE_BYPASS_TX flag for the blackhole engine.

> 
> Please document how it could be used for logical replication.

Will do.

  reply	other threads:[~2018-07-21 12:35 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 [this message]
2018-07-23 11:02       ` Vladimir Davydov
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=20180721123531.zzxiq2e2cnkt3wnt@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