[PATCH 6/6] Introduce blackhole engine
vdavydov.dev at gmail.com
Sat Jul 21 15:35:31 MSK 2018
On Fri, Jul 20, 2018 at 09:42:47PM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at 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
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'
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.
More information about the Tarantool-patches