From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH 1/5] memtx: rtree: remove pointless index_vtab::begin_build implementation Date: Tue, 3 Apr 2018 20:37:39 +0300 Message-Id: <4bda65bcd3b15cf5b47b072ba824f4d29e981b6d.1522775293.git.vdavydov.dev@gmail.com> In-Reply-To: References: In-Reply-To: References: To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: 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