From 0fd8bbca53fafb3a729b0f6f470c2d024d3e6473 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 29 Sep 2014 23:45:23 +0200 Subject: [PATCH] db/db_impl.cc: reduce scope of prefix_initialized Signed-off-by: Danny Al-Gaaf --- db/db_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 3bf60a2d1..1a2b7f7b2 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -3064,7 +3064,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact, assert(compact); compact->CleanupBatchBuffer(); compact->CleanupMergedBuffer(); - bool prefix_initialized = false; // Generate file_levels_ for compaction berfore making Iterator compact->compaction->GenerateFileLevels(); @@ -3149,6 +3148,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact, // 2) send value_buffer to compaction filter and alternate the values; // 3) merge value_buffer with ineligible_value_buffer; // 4) run the modified "compaction" using the old for loop. + bool prefix_initialized = false; shared_ptr backup_input( versions_->MakeInputIterator(compact->compaction)); backup_input->SeekToFirst();