diff --git a/db/version_set.cc b/db/version_set.cc index 246e07f04..7fb4f5665 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1806,11 +1806,11 @@ void Version::Get(const ReadOptions& read_options, const LookupKey& k, cfd_->internal_stats()->GetFileReadHist(fp.GetHitFileLevel()), IsFilterSkipped(static_cast(fp.GetHitFileLevel()), fp.IsHitFileLastInLevel()), - fp.GetCurrentLevel()); + fp.GetHitFileLevel()); // TODO: examine the behavior for corrupted key if (timer_enabled) { PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(), - fp.GetCurrentLevel()); + fp.GetHitFileLevel()); } if (!status->ok()) { return; @@ -1946,11 +1946,11 @@ void Version::MultiGet(const ReadOptions& read_options, MultiGetRange* range, cfd_->internal_stats()->GetFileReadHist(fp.GetHitFileLevel()), IsFilterSkipped(static_cast(fp.GetHitFileLevel()), fp.IsHitFileLastInLevel()), - fp.GetCurrentLevel()); + fp.GetHitFileLevel()); // TODO: examine the behavior for corrupted key if (timer_enabled) { PERF_COUNTER_BY_LEVEL_ADD(get_from_table_nanos, timer.ElapsedNanos(), - fp.GetCurrentLevel()); + fp.GetHitFileLevel()); } if (!s.ok()) { // TODO: Set status for individual keys appropriately @@ -5672,7 +5672,7 @@ InternalIterator* VersionSet::MakeInputIterator( /*table_reader_ptr=*/nullptr, /*file_read_hist=*/nullptr, TableReaderCaller::kCompaction, /*arena=*/nullptr, - /*skip_filters=*/false, /*level=*/static_cast(which), + /*skip_filters=*/false, /*level=*/static_cast(c->level(which)), /*smallest_compaction_key=*/nullptr, /*largest_compaction_key=*/nullptr, /*allow_unprepared_value=*/false); @@ -5686,7 +5686,7 @@ InternalIterator* VersionSet::MakeInputIterator( /*should_sample=*/false, /*no per level latency histogram=*/nullptr, TableReaderCaller::kCompaction, /*skip_filters=*/false, - /*level=*/static_cast(which), range_del_agg, + /*level=*/static_cast(c->level(which)), range_del_agg, c->boundaries(which)); } }