The deletion of obsolete files should not occur very frequently.

Summary:
The method DeleteObsolete files is a very costly methind, especially
when the number of files in a system is large. It makes a list of
all live-files and then scans the directory to compute the diff.
By default, this method is executed after every compaction run.

This patch makes it such that DeleteObsolete files is never
invoked twice within a configured period.

Test Plan: run all unit tests

Reviewers: heyongqiang, MarkCallaghan

Reviewed By: MarkCallaghan

Differential Revision: https://reviews.facebook.net/D6045
This commit is contained in:
Dhruba Borthakur
2012-10-16 08:53:46 -07:00
parent 0230866791
commit aa73538f2a
5 changed files with 34 additions and 2 deletions

View File

@@ -41,7 +41,8 @@ Options::Options()
use_fsync(false),
db_stats_log_interval(1800),
db_log_dir(""),
disable_seek_compaction(false) {
disable_seek_compaction(false),
delete_obsolete_files_period_micros(0) {
}
void