From d666225a0a01f531c910b81945329bff397c6537 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 28 Sep 2015 15:29:31 -0400 Subject: [PATCH] db_impl: disable recycle_log_files if WAL archive is enabled We can't recycle the files if they are being archived. Signed-off-by: Sage Weil --- db/db_impl.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/db_impl.cc b/db/db_impl.cc index 42df6ec66..dbf97fb7c 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -150,6 +150,10 @@ DBOptions SanitizeOptions(const std::string& dbname, const DBOptions& src) { } } + if (result.WAL_ttl_seconds > 0 || result.WAL_size_limit_MB > 0) { + result.recycle_log_file_num = false; + } + if (result.wal_dir.empty()) { // Use dbname as default result.wal_dir = dbname;