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

@@ -51,7 +51,8 @@ Options::Options()
no_block_cache(false),
table_cache_numshardbits(4),
compaction_filter_args(NULL),
CompactionFilter(NULL) {
CompactionFilter(NULL),
disable_auto_compactions(false) {
}
void
@@ -134,6 +135,8 @@ Options::Dump(
compaction_filter_args);
Log(log," Options.CompactionFilter: %p",
CompactionFilter);
Log(log," Options.disable_auto_compactions: %d",
disable_auto_compactions);
} // Options::Dump
} // namespace leveldb