From: Vladimir Davydov <vdavydov.dev@gmail.com> To: kostja@tarantool.org Cc: tarantool-patches@freelists.org Subject: [PATCH 1/5] memtx: rtree: remove pointless index_vtab::begin_build implementation Date: Tue, 3 Apr 2018 20:37:39 +0300 [thread overview] Message-ID: <4bda65bcd3b15cf5b47b072ba824f4d29e981b6d.1522775293.git.vdavydov.dev@gmail.com> (raw) In-Reply-To: <cover.1522775293.git.vdavydov.dev@gmail.com> In-Reply-To: <cover.1522775293.git.vdavydov.dev@gmail.com> The rtree is empty when this function is called (in fact, it is called right after creating the index), there's no need to purge it. --- src/box/memtx_rtree.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/box/memtx_rtree.c b/src/box/memtx_rtree.c index 7cd3ac30..ff213922 100644 --- a/src/box/memtx_rtree.c +++ b/src/box/memtx_rtree.c @@ -285,13 +285,6 @@ memtx_rtree_index_create_iterator(struct index *base, enum iterator_type type, return (struct iterator *)it; } -static void -memtx_rtree_index_begin_build(struct index *base) -{ - struct memtx_rtree_index *index = (struct memtx_rtree_index *)base; - rtree_purge(&index->tree); -} - static const struct index_vtab memtx_rtree_index_vtab = { /* .destroy = */ memtx_rtree_index_destroy, /* .commit_create = */ generic_index_commit_create, @@ -313,7 +306,7 @@ static const struct index_vtab memtx_rtree_index_vtab = { generic_index_create_snapshot_iterator, /* .info = */ generic_index_info, /* .reset_stat = */ generic_index_reset_stat, - /* .begin_build = */ memtx_rtree_index_begin_build, + /* .begin_build = */ generic_index_begin_build, /* .reserve = */ generic_index_reserve, /* .build_next = */ generic_index_build_next, /* .end_build = */ generic_index_end_build, -- 2.11.0
next prev parent reply other threads:[~2018-04-03 17:37 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-03 17:37 [PATCH 0/5] alter: fix WAL error handling Vladimir Davydov 2018-04-03 17:37 ` Vladimir Davydov [this message] 2018-04-05 20:25 ` [PATCH 1/5] memtx: rtree: remove pointless index_vtab::begin_build implementation Konstantin Osipov 2018-04-03 17:37 ` [PATCH 2/5] memtx: don't call begin_buid and end_build for new pk after recovery Vladimir Davydov 2018-04-03 17:37 ` [PATCH 3/5] vinyl: use disk_format in vy_run_rebuild_index Vladimir Davydov 2018-04-05 20:25 ` Konstantin Osipov 2018-04-03 17:37 ` [PATCH 4/5] vinyl: do not use space_vtab::commit_alter for preparing new indexes Vladimir Davydov 2018-04-03 17:37 ` [PATCH 5/5] alter: call space_vtab::commit_alter after WAL write Vladimir Davydov 2018-04-05 20:37 ` Konstantin Osipov 2018-04-06 10:59 ` 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=4bda65bcd3b15cf5b47b072ba824f4d29e981b6d.1522775293.git.vdavydov.dev@gmail.com \ --to=vdavydov.dev@gmail.com \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [PATCH 1/5] memtx: rtree: remove pointless index_vtab::begin_build implementation' \ /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