rocksdb/db/compaction
Levi Tamasi f34782a67d Fix the "records dropped" statistics (#6325)
Summary:
The earlier code used two conflicting definitions for the number of
input records going into a compaction, one based on the
`rocksdb.num.entries` table property and one based on
`CompactionIterationStats`. The first one is correct and in line
with how output records are counted, while the second one incorrectly
ignores input records in various cases when the `CompactionIterator`
advances or reseeks the input iterator (this can happen, amongst other
cases, when dealing with `SingleDelete`s, regular `Delete`s, `Merge`s,
and compaction filters). This can result in the code undercounting the
input records and computing an incorrect value for "records dropped"
during the compaction. The patch fixes this by switching over to the
correct (table property based) input record count for "records dropped".
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6325

Test Plan: Tested using `make check` and `db_bench`.

Differential Revision: D19525491

Pulled By: ltamasi

fbshipit-source-id: 4340b0b2f41546db8e356db70ca02199e48fa636
2020-01-23 15:27:22 -08:00
..
compaction_iteration_stats.h Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
compaction_iterator_test.cc Fixes for g++ 4.9.2 compatibility (#6053) 2019-11-19 15:43:37 -08:00
compaction_iterator.cc Set CompactionIterator::valid_ to false when PrepareBlobOutput indicates error 2019-12-17 10:20:16 -08:00
compaction_iterator.h Turn compaction asserts to runtime check (#5935) 2019-10-30 13:48:38 -07:00
compaction_job_stats_test.cc Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
compaction_job_test.cc Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
compaction_job.cc Fix the "records dropped" statistics (#6325) 2020-01-23 15:27:22 -08:00
compaction_job.h Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
compaction_picker_fifo.cc Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_fifo.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_level.cc Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_level.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_test.cc Support options.max_open_files = -1 with periodic_compaction_seconds (#6090) 2019-11-26 21:39:56 -08:00
compaction_picker_universal.cc Fix UniversalCompaction trivial move bug (#6067) 2019-12-11 11:27:53 -08:00
compaction_picker_universal.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker.cc fix unstable unittest caused by #5958 (#6061) 2019-11-21 15:24:01 -08:00
compaction_picker.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction.cc Consider all compaction input files to compute the oldest ancestor time (#6279) 2020-01-10 19:02:42 -08:00
compaction.h Support options.ttl with options.max_open_files = -1 (#6060) 2019-11-22 21:23:00 -08:00