From: Konstantin Osipov <kostja@tarantool.org> To: tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH 1/3] vinyl: use update_def index method to update vy_lsm on ddl Date: Thu, 25 Jul 2019 01:25:01 +0300 [thread overview] Message-ID: <20190724222500.GA13150@atlas> (raw) In-Reply-To: <20a1aafbfba6068f17a07b01e4c829db0d429fe0.1563895921.git.vdavydov.dev@gmail.com> * Vladimir Davydov <vdavydov.dev@gmail.com> [19/07/23 18:49]: > When an index definition is modified by DDL in such a way that doesn't > require index rebuild (e.g. a key part type is changed from unsigned to > integer), we move the index from the old space container to the new one, > see ModifyIndex. In case of Vinyl we also need to update key definitions > and options stored in vy_lsm. We do that in swap_index space method, but > this isn't entirely correct, as this method is also called when an index > is moved without any modifications, see MoveIndex. Let's do this from > update_def index method instead, which seems to be more suitable. > > The only reason this code lives in swap_index space method now is that > we didn't have update_def index method when this functionality was > introduced in the first place. First of all, it is extremely annoying that instead of testing this properly despite my humble, repeated requests we waited for these bugs to surface and now address them with urgent patches. I see if I could find anything wrong with this patch but I can't. > +static struct key_def * > +key_def_do_copy(struct key_def *res, const struct key_def *src, size_t sz) I personally prefer _impl to do_. -- Konstantin Osipov, Moscow, Russia
next prev parent reply other threads:[~2019-07-24 22:25 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-23 15:49 [PATCH 0/3] Fix crash on rollback of mixed DML/DDL transaction Vladimir Davydov 2019-07-23 15:49 ` [PATCH 1/3] vinyl: use update_def index method to update vy_lsm on ddl Vladimir Davydov 2019-07-24 22:25 ` Konstantin Osipov [this message] 2019-07-25 8:38 ` [tarantool-patches] " Vladimir Davydov 2019-07-25 12:11 ` Vladimir Davydov 2019-07-23 15:49 ` [PATCH 2/3] vinyl: move unique check optimization setup to the space level Vladimir Davydov 2019-07-24 22:31 ` [tarantool-patches] " Konstantin Osipov 2019-07-25 8:46 ` Vladimir Davydov 2019-07-25 12:11 ` Vladimir Davydov 2019-07-23 15:49 ` [PATCH 3/3] alter: fix rollback in case DDL and DML are used in the same transaction Vladimir Davydov 2019-07-24 22:32 ` [tarantool-patches] " Konstantin Osipov 2019-07-25 8:51 ` Vladimir Davydov 2019-07-30 10:56 ` Vladimir Davydov 2019-07-30 12:14 ` 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=20190724222500.GA13150@atlas \ --to=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH 1/3] vinyl: use update_def index method to update vy_lsm on ddl' \ /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