[PATCH 1/9] vinyl: update lsm->range_heap in one go on dump completion
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Jan 24 19:55:45 MSK 2019
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.
More information about the Tarantool-patches
mailing list