From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: tarantool-patches@freelists.org Cc: georgy@tarantool.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] [PATCH v1 1/2] box: refactor index termination on space drop Date: Sat, 17 Nov 2018 16:16:54 +0300 [thread overview] Message-ID: <6ceb36f5312d5495efa4823961e41205e6c4a317.1542460247.git.kshcherbatov@tarantool.org> (raw) In-Reply-To: <cover.1542460247.git.kshcherbatov@tarantool.org> In-Reply-To: <cover.1542460247.git.kshcherbatov@tarantool.org> Drop indexes via index object metamethod call instead of direct _index space tuple deletion. With functional indexes patch drop metamethod would be redefined to make an extra service operations during index deletion. Need for #1260 --- src/box/lua/schema.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua index 8a804f0..b6693b1 100644 --- a/src/box/lua/schema.lua +++ b/src/box/lua/schema.lua @@ -524,7 +524,8 @@ box.schema.space.drop = function(space_id, space_name, opts) local keys = _vindex:select(space_id) for i = #keys, 1, -1 do local v = keys[i] - _index:delete{v[1], v[2]} + local index = box.space[space_id].index[v[2]] + index:drop() end for _, t in _fk_constraint.index.child_id:pairs({space_id}) do _fk_constraint:delete({t.name, space_id}) -- 2.7.4
next prev parent reply other threads:[~2018-11-17 13:17 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-17 13:16 [tarantool-patches] [PATCH v1 0/2] box: functional and multikey indexes Kirill Shcherbatov 2018-11-17 13:16 ` Kirill Shcherbatov [this message] 2018-11-19 12:22 ` [tarantool-patches] Re: [PATCH] functional and multikey indexes RFC Kirill Shcherbatov 2018-11-20 12:18 ` Kirill Shcherbatov [not found] ` <45d55e70c60c5c4b5806c8e7ce3330957a8dc0ce.1542460247.git.kshcherbatov@tarantool.org> 2018-11-20 12:18 ` [tarantool-patches] Re: [PATCH v1 2/2] box: functional and multikey indexes Kirill Shcherbatov
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=6ceb36f5312d5495efa4823961e41205e6c4a317.1542460247.git.kshcherbatov@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=georgy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v1 1/2] box: refactor index termination on space drop' \ /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