Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH v2 2/3] ddl: don't use space_index from AlterSpaceOp::commit,rollback
Date: Mon, 15 Jul 2019 18:05:48 +0300	[thread overview]
Message-ID: <20190715150548.GB16877@atlas> (raw)
In-Reply-To: <32e42602f21a0b40394e915f013b837cea35ce6f.1562763283.git.vdavydov.dev@gmail.com>

* Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/10 16:13]:
> If there are multiple DDL operations in the same transactions, which is
> impossible now, but will be implemented soon, AlterSpaceOp::commit and
> rollback methods must not access space index map. To understand that,
> consider the following example:
> 
>   - on_replace: AlterSpaceOp1 creates index I1 for space S1
>   - on_replace: AlterSpaceOp2 moves index I1 from space S1 to space S2
>   - on_commit:  AlterSpaceOp1 commits creation of index I1
> 
> AlterSpaceOp1 can't lookup I1 in S1 by id, because the index was moved
> from S1 to S2 by AlterSpaceOp2. If AlterSpaceOp1 attempts to look it up,
> it will access a wrong index.
> 
> Fix that by storing pointers to old and new indexes in AlterSpaceOp if
> required.

Please make this comment more clear.

LGTM.


-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-07-15 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 13:09 [PATCH v2 0/3] Transactional DDL Vladimir Davydov
2019-07-10 13:09 ` [PATCH v2 1/3] memtx: fix txn_on_yield for DDL transactions Vladimir Davydov
2019-07-10 20:34   ` Konstantin Osipov
2019-07-12 14:54     ` Vladimir Davydov
2019-07-12 15:16       ` Konstantin Osipov
2019-07-10 13:09 ` [PATCH v2 2/3] ddl: don't use space_index from AlterSpaceOp::commit,rollback Vladimir Davydov
2019-07-15 15:05   ` Konstantin Osipov [this message]
2019-07-10 13:09 ` [PATCH v2 3/3] ddl: allow to execute non-yielding DDL statements in transactions Vladimir Davydov
2019-07-10 20:43   ` Konstantin Osipov
2019-07-12 14:55     ` Vladimir Davydov
2019-07-10 21:07   ` Konstantin Osipov
2019-07-15 15:03   ` Konstantin Osipov
2019-07-15 16:23 ` [PATCH v2 0/3] Transactional DDL Vladimir Davydov

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=20190715150548.GB16877@atlas \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v2 2/3] ddl: don'\''t use space_index from AlterSpaceOp::commit,rollback' \
    /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