DB WAL size limit (#1935)

* Limit WAL size

* Check pruning by db modification date (#1924)
This commit is contained in:
Arkadiy Paronyan
2016-08-17 15:55:26 +02:00
committed by Gav Wood
parent 46f029e65c
commit e2cf8a894f
2 changed files with 7 additions and 14 deletions

View File

@@ -213,6 +213,7 @@ impl Database {
if let Some(rate_limit) = config.compaction.write_rate_limit {
try!(opts.set_parsed_options(&format!("rate_limiter_bytes_per_sec={}", rate_limit)));
}
try!(opts.set_parsed_options(&format!("max_total_wal_size={}", 64 * 1024 * 1024)));
opts.set_max_open_files(config.max_open_files);
opts.create_if_missing(true);
opts.set_use_fsync(false);