From: Vladimir Davydov <vdavydov.dev@gmail.com> To: Roman Khabibov <roman.habibov@tarantool.org> Cc: tarantool-patches@freelists.org Subject: Re: [tarantool-patches] Re: [PATCH 1/2] schema: add "_vcollation" sysview Date: Wed, 5 Jun 2019 20:56:45 +0300 [thread overview] Message-ID: <20190605175645.wm3gyqtyb5i22oq4@esperanza> (raw) In-Reply-To: <D31B82AF-22F7-474B-B6D5-FBE797CBBFFA@tarantool.org> On Wed, Jun 05, 2019 at 08:08:46PM +0300, Roman Khabibov wrote: > >> +local function upgrade_to_2_1_4() > >> + local _collation = box.space._collation > >> + local _index = box.space._index > >> + > >> + -- System space format usually is in order "id, owner, name...". > >> + -- The fields "name", "owner" are swapped in "_collation" format, > >> + -- due to the field "owner" was added after the "_collation" creation. > >> + box.space._index:delete{276, 1} > >> + log.info("update index name on _collation") > >> + box.space._index:insert{_collation.id, 2, 'name', 'tree', {unique = true}, > >> + {{1, 'string'}}} > >> + log.info("create index owner on _collation") > >> + box.space._index:insert{_collation.id, 1, 'owner', 'tree', {unique = false}, > >> + {{2, 'unsigned'}}} > > > > I don't understand this part. Why do you need to create 'owner' index? > > Why do you need to update 'name' index? > create_sysview() can’t work otherwise. I fail to see why is that. Could you please elaborate? > > + > +-- Fit _collation indexes to be suitable forcreate_sysview(). > +local function upgrade_collation_to_2_2_2() > + local _collation = box.space._collation > + local _index = box.space._index > > > > >> + create_vcollation_space() > >> +end > >> + > >> local function get_version() > >> local version = box.space._schema:get{'version'} > >> if version == nil then > >> @@ -768,6 +792,7 @@ local function upgrade(options) > >> {version = mkversion(2, 1, 1), func = upgrade_to_2_1_1, auto = true}, > >> {version = mkversion(2, 1, 2), func = upgrade_to_2_1_2, auto = true}, > >> {version = mkversion(2, 1, 3), func = upgrade_to_2_1_3, auto = true}, > >> + {version = mkversion(2, 1, 4), func = upgrade_to_2_1_4, auto = true} > > > > Should be in upgrade_to_2_2_1. > To 2.2.2 maybe? No. The last release was 2.2.0 so the next one will be 2.2.1.
next prev parent reply other threads:[~2019-06-05 17:56 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-30 12:36 [tarantool-patches] [PATCH 0/2] Add _vcollation and fetch in net.box Roman Khabibov 2019-05-30 12:36 ` [tarantool-patches] [PATCH 1/2] schema: add "_vcollation" sysview Roman Khabibov 2019-06-04 16:31 ` Vladimir Davydov 2019-06-05 17:08 ` [tarantool-patches] " Roman Khabibov 2019-06-05 17:56 ` Vladimir Davydov [this message] 2019-06-06 15:18 ` Roman Khabibov 2019-05-30 12:36 ` [tarantool-patches] [PATCH 2/2] net.box: fetch '_vcollation' sysview into the module Roman Khabibov 2019-06-04 16:36 ` Vladimir Davydov 2019-06-05 17:08 ` [tarantool-patches] " Roman Khabibov 2019-06-05 17:28 ` Vladimir Davydov 2019-06-06 15:22 ` Roman Khabibov 2019-06-06 16:00 ` Roman Khabibov 2019-06-06 17:00 ` Vladimir Davydov 2019-06-03 18:45 ` [tarantool-patches] Re: [PATCH 0/2] Add _vcollation and fetch in net.box Vladislav Shpilevoy 2019-06-04 15:54 ` [tarantool-patches] " Vladimir Davydov -- strict thread matches above, loose matches on Subject: below -- 2019-05-16 11:24 [tarantool-patches] [PATCH 0/2] Add "_vcollation" sysview and fetch it " Roman Khabibov 2019-05-16 11:24 ` [tarantool-patches] [PATCH 1/2] schema: add "_vcollation" sysview Roman Khabibov 2019-05-16 12:43 ` [tarantool-patches] " Konstantin Osipov 2019-05-28 15:50 ` Roman Khabibov 2019-05-30 11:57 ` 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=20190605175645.wm3gyqtyb5i22oq4@esperanza \ --to=vdavydov.dev@gmail.com \ --cc=roman.habibov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] Re: [PATCH 1/2] schema: add "_vcollation" sysview' \ /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