From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 24 May 2018 09:13:35 +0300 From: Vladimir Davydov Subject: Re: [PATCH v2 1/2] memtx: rework background garbage collection procedure Message-ID: <20180524061335.o62p3hlubyb75mci@esperanza> References: <20180523175655.GD4266@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523175655.GD4266@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Wed, May 23, 2018 at 08:56:55PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [18/05/22 20:29]: > > { > > - index_def_delete(index->def); > > + /* > > + * Free index_def after destroying the index as > > + * engine might still need it. > > + */ > > For what? In this patch I rewrote the code of memtx tree/hash destruction so that now they check if they are dealing with a primary index explicitly, i.e. via index->def->iid, see memtx_{hash,tree}_index_destroy. I think it's easier for understanding. I'll update the comment to reflect this. > > > + struct index_def *def = index->def; > > index->vtab->destroy(index); > > + index_def_delete(def); > > } > > OK to push.