]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonitorDBStore: use mon_rocksdb_options if backend is Rocksdb
authorXiaoxi Chen <xiaoxi.chen@intel.com>
Fri, 8 May 2015 08:18:00 +0000 (16:18 +0800)
committerXiaoxi Chen <xiaoxi.chen@intel.com>
Wed, 13 May 2015 00:22:45 +0000 (08:22 +0800)
use mon_rocksdb_options if using RocksDB as backend for monstore.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
src/mon/MonitorDBStore.h

index e37b95db9008584e8113b45e81b70476dc8665f1..d00d3607960b0a408c1a37f18ce21cee78e9bf62 100644 (file)
@@ -568,7 +568,10 @@ class MonitorDBStore
   }
 
   int open(ostream &out) {
-    db->init();
+    if (g_conf->mon_keyvaluedb == "rocksdb")
+      db->init(g_conf->mon_rocksdb_options);
+    else
+      db->init();
     int r = db->open(out);
     if (r < 0)
       return r;
@@ -578,7 +581,10 @@ class MonitorDBStore
   }
 
   int create_and_open(ostream &out) {
-    db->init();
+    if (g_conf->mon_keyvaluedb == "rocksdb")
+      db->init(g_conf->mon_rocksdb_options);
+    else
+      db->init();
     int r = db->create_and_open(out);
     if (r < 0)
       return r;