From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH 1/3] vinyl: remove useless local var from vy_range_update_compact_priority Date: Sat, 20 Oct 2018 21:23:08 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: Local variable total_size equals total_stmt_count.bytes_compressed so we don't really need it. --- src/box/vy_range.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/box/vy_range.c b/src/box/vy_range.c index 0558098a..af1227ea 100644 --- a/src/box/vy_range.c +++ b/src/box/vy_range.c @@ -312,8 +312,6 @@ vy_range_update_compact_priority(struct vy_range *range, vy_disk_stmt_counter_reset(&total_stmt_count); /* Total number of checked runs. */ uint32_t total_run_count = 0; - /* The total size of runs checked so far. */ - uint64_t total_size = 0; /* Estimated size of a compacted run, if compaction is scheduled. */ uint64_t est_new_run_size = 0; /* The number of runs at the current level. */ @@ -335,7 +333,6 @@ vy_range_update_compact_priority(struct vy_range *range, */ if (target_run_size == 0) target_run_size = size; - total_size += size; level_run_count++; total_run_count++; vy_disk_stmt_counter_add(&total_stmt_count, &slice->count); @@ -377,7 +374,7 @@ vy_range_update_compact_priority(struct vy_range *range, */ range->compact_priority = total_run_count; range->compact_queue = total_stmt_count; - est_new_run_size = total_size; + est_new_run_size = total_stmt_count.bytes_compressed; } } } -- 2.11.0