Support to disable background compactions on a database.

Summary:
This option is needed for fast bulk uploads. The goal is to load
all the data into files in L0 without any interference from
background compactions.

Test Plan: make clean check

Reviewers: sheki

Reviewed By: sheki

CC: leveldb

Differential Revision: https://reviews.facebook.net/D6849
This commit is contained in:
Dhruba Borthakur
2012-11-20 15:45:41 -08:00
parent 3754f2f4ff
commit fbb73a4ac3
4 changed files with 17 additions and 3 deletions

View File

@@ -330,6 +330,10 @@ struct Options {
bool (*CompactionFilter)(void* compaction_filter_args,
int level, const Slice& key,
const Slice& existing_value, Slice** new_value);
// Disable automatic compactions. Manual compactions can still
// be issued on this database.
bool disable_auto_compactions;
};
// Options that control read operations