Fix mis-reporting of compaction read bytes to the base level

Summary:
In dynamic leveled compaction, when calculating read bytes, output level bytes may be wronglyl calculated as input level inputs. Fix it.
Closes https://github.com/facebook/rocksdb/pull/1475

Differential Revision: D4148412

Pulled By: siying

fbshipit-source-id: f2f475a
main
Siying Dong 8 years ago committed by Facebook Github Bot
parent 3c6b49ed66
commit 7784980fcd
  1. 3
      db/compaction_job.cc

@ -1261,8 +1261,7 @@ void CompactionJob::UpdateCompactionStats() {
for (int input_level = 0;
input_level < static_cast<int>(compaction->num_input_levels());
++input_level) {
if (compaction->start_level() + input_level
!= compaction->output_level()) {
if (compaction->level(input_level) != compaction->output_level()) {
UpdateCompactionInputStatsHelper(
&compaction_stats_.num_input_files_in_non_output_levels,
&compaction_stats_.bytes_read_non_output_levels,

Loading…
Cancel
Save