]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
db_impl: disable recycle_log_files if WAL archive is enabled
authorSage Weil <sage@redhat.com>
Mon, 28 Sep 2015 19:29:31 +0000 (15:29 -0400)
committerSage Weil <sage@redhat.com>
Thu, 8 Oct 2015 02:11:27 +0000 (22:11 -0400)
We can't recycle the files if they are being archived.

Signed-off-by: Sage Weil <sage@redhat.com>
db/db_impl.cc

index f4ff9762550f55e7a1a299da0f43b4a8b34dabc3..2e05c68672109e2e768b36d831a7933425a0af35 100644 (file)
@@ -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;