Fix double-counted deletion stat

Summary:
Both the single deletion and the value are included in compaction outputs, so no need to update the stat for the value's deletion yet, otherwise it'd be double-counted.
Closes https://github.com/facebook/rocksdb/pull/1574

Differential Revision: D4241181

Pulled By: ajkr

fbshipit-source-id: c9aaa15
main
Andrew Kryczka 8 years ago committed by Facebook Github Bot
parent 7ffb10fc1a
commit 01eabf7375
  1. 1
      db/compaction_iterator.cc

@ -310,7 +310,6 @@ void CompactionIterator::NextFromInput() {
// to know that a write happened in this snapshot (Rule 2 above). // to know that a write happened in this snapshot (Rule 2 above).
// Clear the value and output the SingleDelete. (The value will be // Clear the value and output the SingleDelete. (The value will be
// outputted on the next iteration.) // outputted on the next iteration.)
++iter_stats_.num_record_drop_hidden;
// Setting valid_ to true will output the current SingleDelete // Setting valid_ to true will output the current SingleDelete
valid_ = true; valid_ = true;

Loading…
Cancel
Save