From: Sage Weil Date: Tue, 29 Sep 2015 02:35:04 +0000 (-0400) Subject: os/newstore: newstore_backend_options -> newstore_rocksdb_options X-Git-Tag: v10.0.1~39^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c0ae4b86d8f8f78252c5d893c5d8960347cb218;p=ceph.git os/newstore: newstore_backend_options -> newstore_rocksdb_options 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 --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 1d6edd8d03c..cc5de7858b5 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index bb69babc235..f25d1ea9cea 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -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; }