From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH 1/9] vinyl: update lsm->range_heap in one go on dump completion Date: Mon, 21 Jan 2019 00:17:00 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: To: tarantool-patches@freelists.org List-ID: 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: -- 2.11.0