]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore: newstore_backend_options -> newstore_rocksdb_options
authorSage Weil <sage@redhat.com>
Tue, 29 Sep 2015 02:35:04 +0000 (22:35 -0400)
committerSage Weil <sage@redhat.com>
Mon, 16 Nov 2015 18:23:15 +0000 (13:23 -0500)
This way we can have default settings per-backend.  Also note that
this is what we currently do with leveldb on the mon and osd.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/newstore/NewStore.cc

index 1d6edd8d03c8878fed5e2b65d53137b6a9418b9b..cc5de7858b538bcfa4f15a6c5501c46b15206e92 100644 (file)
@@ -812,7 +812,7 @@ OPTION(memstore_page_size, OPT_U64, 64 << 10)
 OPTION(newstore_max_dir_size, OPT_U32, 1000000)
 OPTION(newstore_onode_map_size, OPT_U32, 1024)   // onodes per collection
 OPTION(newstore_backend, OPT_STR, "rocksdb")
-OPTION(newstore_backend_options, OPT_STR, "max_write_buffer_number=16,min_write_buffer_number_to_merge=6")
+OPTION(newstore_rocksdb_options, OPT_STR, "max_write_buffer_number=16,min_write_buffer_number_to_merge=6")
 OPTION(newstore_fail_eio, OPT_BOOL, true)
 OPTION(newstore_sync_io, OPT_BOOL, false)  // perform initial io synchronously
 OPTION(newstore_sync_transaction, OPT_BOOL, false)  // perform kv txn synchronously
index bb69babc23564ae8e26da0434e7dd4935b126fde..f25d1ea9cea170e57487dabbc7ed0462ac485298 100644 (file)
@@ -817,7 +817,10 @@ int NewStore::_open_db()
     db = NULL;
     return -EIO;
   }
-  db->init(g_conf->newstore_backend_options);
+  string options;
+  if (g_conf->newstore_backend == "rocksdb")
+    options = g_conf->newstore_rocksdb_options;
+  db->init(options);
   stringstream err;
   if (db->create_and_open(err)) {
     derr << __func__ << " erroring opening db: " << err.str() << dendl;
@@ -826,8 +829,7 @@ int NewStore::_open_db()
     return -EIO;
   }
   dout(1) << __func__ << " opened " << g_conf->newstore_backend
-         << " path " << path
-         << " options " << g_conf->newstore_backend_options << dendl;
+         << " path " << path << " options " << options << dendl;
   return 0;
 }