From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 24 Jan 2019 19:55:45 +0300 From: Vladimir Davydov Subject: Re: [PATCH 1/9] vinyl: update lsm->range_heap in one go on dump completion Message-ID: <20190124165545.l3ahhvxfpz4tncm3@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: tarantool-patches@freelists.org List-ID: On Mon, Jan 21, 2019 at 12:17:00AM +0300, Vladimir Davydov wrote: > Upon LSM tree dump completion, we iterate over all ranges of the LSM > tree to update their priority and the position in the compaction heap. > Since typically we need to update all ranges, we better use update_all > heap method instead of updating the heap entries one by one. > --- > src/box/vy_scheduler.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/src/box/vy_scheduler.c b/src/box/vy_scheduler.c > index c59bedee..5ec6d171 100644 > --- a/src/box/vy_scheduler.c > +++ b/src/box/vy_scheduler.c > @@ -1227,10 +1227,8 @@ vy_task_dump_complete(struct vy_task *task) > vy_range_add_slice(range, slice); > vy_range_update_compaction_priority(range, &lsm->opts); > vy_lsm_acct_range(lsm, range); > - if (!vy_range_is_scheduled(range)) > - vy_range_heap_update(&lsm->range_heap, > - &range->heap_node); > } > + vy_range_heap_update_all(&lsm->range_heap); > free(new_slices); > > delete_mems: This one is trivial and should raise no questions. I pushed it to 2.1 and 1.10.