rocksdb/utilities/table_properties_collectors
Andrew Kryczka 5df172da2f fix deletion-triggered compaction in table builder
Summary:
It was broken when `NotifyCollectTableCollectorsOnFinish` was introduced. That function called `Finish` on each of the `TablePropertiesCollector`s, and `CompactOnDeletionCollector::Finish()` was resetting all its internal state. Then, when we checked whether compaction is necessary, the flag had already been cleared.

Fixed above issue by avoiding resetting internal state during `Finish()`. Multiple calls to `Finish()` are allowed, but callers cannot invoke `AddUserKey()` on the collector after any finishes.
Closes https://github.com/facebook/rocksdb/pull/2936

Differential Revision: D5918659

Pulled By: ajkr

fbshipit-source-id: 4f05e9d80e50ee762ba1e611d8d22620029dca6b
2017-09-28 18:17:30 -07:00
..
compact_on_deletion_collector_test.cc fix deletion-triggered compaction in table builder 2017-09-28 18:17:30 -07:00
compact_on_deletion_collector.cc fix deletion-triggered compaction in table builder 2017-09-28 18:17:30 -07:00
compact_on_deletion_collector.h fix deletion-triggered compaction in table builder 2017-09-28 18:17:30 -07:00