Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: "Георгий Кириченко" <georgy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH] Do not enable commit if read_only = true
Date: Mon, 4 Mar 2019 12:41:42 +0300	[thread overview]
Message-ID: <20190304094142.GA30799@chai> (raw)
In-Reply-To: <1779552.GDyJA9gWEY@home.lan>

* Георгий Кириченко <georgy@tarantool.org> [19/03/03 23:50]:
> On Thursday, February 28, 2019 1:25:30 PM MSK Konstantin Osipov wrote:
> > * Vladimir Davydov <vdavydov.dev@gmail.com> [19/02/27 12:26]:
> > > On Wed, Feb 27, 2019 at 10:36:00AM +0300, Georgy Kirichenko wrote:
> > > > Disable commit if server is in read only mode.
> > > 
> > > The commit message is very poor. Please elaborate why this is important.
> > 
> > Having thought about it we should go over all in-flight
> > transactions in vinyl and abort them.
> > 
> > We already use this approach on DDL.
> > We could make it more general.
> I did a little investigation and found that current implementation does not 
> allow us do reach expected behavior using vinyl aborts because of
> * transaction placed in the write set only after uniqueness
> check - this leads 
> to a race if read only was set during this check.

tx_manager_abort_writers() looks for a single lsm only anyway. In
case of read-only you need to abort all write transactions
against all spaces. 

You have two broad options with this problem: fix the existing
infrastructure or begin building a new one. 

Adding an extra check to txn_commit() is neither. You will have
two checks for read_only, but your ddl will continue to be broken.

For example, the problem you mention about vinyl write
transactions being added to tx_manager->writers after yield also
affects vinyl ddl. By adding an extra read_only check to
txn_commit() you won't fix it.

So I think we should first consider fixing tx_manager->writers list, so
that transactions end up in this list before yield, and
implementing vy_tx_about_writers() for all write transactions. I
asked Vova to look into this since this is vinyl domain and a bit
tricky one.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

      reply	other threads:[~2019-03-04  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27  7:36 [tarantool-patches] " Georgy Kirichenko
2019-02-27  9:02 ` Vladimir Davydov
2019-02-28 10:25   ` [tarantool-patches] " Konstantin Osipov
2019-03-03 20:49     ` Георгий Кириченко
2019-03-04  9:41       ` Konstantin Osipov [this message]

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=20190304094142.GA30799@chai \
    --to=kostja@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] Do not enable commit if read_only = true' \
    /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