From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 21 Jul 2018 15:35:31 +0300 From: Vladimir Davydov Subject: Re: [PATCH 6/6] Introduce blackhole engine Message-ID: <20180721123531.zzxiq2e2cnkt3wnt@esperanza> References: <638ad828056ebe88fba0692963fde70a52768e69.1532107326.git.vdavydov.dev@gmail.com> <20180720184247.GG4827@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180720184247.GG4827@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Fri, Jul 20, 2018 at 09:42:47PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [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.