From: Haomai Wang Date: Fri, 21 Feb 2014 14:48:00 +0000 (+0800) Subject: Add KeyValueStore op thread options X-Git-Tag: v0.78~130^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a52d7cd03bb3264c15cc1b934677e752546c23cf;p=ceph.git Add KeyValueStore op thread options Signed-off-by: Haomai Wang --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index b2cffc7508e3..5332d276df19 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -653,6 +653,9 @@ OPTION(journal_force_aio, OPT_BOOL, false) OPTION(keyvaluestore_queue_max_ops, OPT_INT, 50) OPTION(keyvaluestore_queue_max_bytes, OPT_INT, 100 << 20) OPTION(keyvaluestore_check_backend, OPT_BOOL, 0) // Expensive debugging check on sync +OPTION(keyvaluestore_op_threads, OPT_INT, 2) +OPTION(keyvaluestore_op_thread_timeout, OPT_INT, 60) +OPTION(keyvaluestore_op_thread_suicide_timeout, OPT_INT, 180) // max bytes to search ahead in journal searching for corruption OPTION(journal_max_corrupt_search, OPT_U64, 10<<20) diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 54d5d5de8c7d..59219c367fe5 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -502,9 +502,9 @@ KeyValueStore::KeyValueStore(const std::string &base, op_throttle_lock("KeyValueStore::op_throttle_lock"), op_finisher(g_ceph_context), op_tp(g_ceph_context, "KeyValueStore::op_tp", - g_conf->filestore_op_threads, "keyvaluestore_op_threads"), - op_wq(this, g_conf->filestore_op_thread_timeout, - g_conf->filestore_op_thread_suicide_timeout, &op_tp), + g_conf->keyvaluestore_op_threads, "keyvaluestore_op_threads"), + op_wq(this, g_conf->keyvaluestore_op_thread_timeout, + g_conf->keyvaluestore_op_thread_suicide_timeout, &op_tp), logger(NULL), m_keyvaluestore_queue_max_ops(g_conf->keyvaluestore_queue_max_ops), m_keyvaluestore_queue_max_bytes(g_conf->keyvaluestore_queue_max_bytes), @@ -2493,9 +2493,8 @@ int KeyValueStore::_collection_rename(const coll_t &cid, const coll_t &ncid, return -EEXIST; } - int r = t.lookup_cached_header(get_coll_for_coll(), - make_ghobject_for_coll(cid), - &header, false); + r = t.lookup_cached_header(get_coll_for_coll(), make_ghobject_for_coll(cid), + &header, false); if (r < 0) { dout(2) << __func__ << ": " << cid << " DNE" << dendl; return 0;