]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Add KeyValueStore op thread options
authorHaomai Wang <haomaiwang@gmail.com>
Fri, 21 Feb 2014 14:48:00 +0000 (22:48 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sat, 22 Feb 2014 13:05:01 +0000 (21:05 +0800)
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/common/config_opts.h
src/os/KeyValueStore.cc

index b2cffc7508e3a7ba6fcbd0daa75a081174e4ed89..5332d276df1996e35166246493815cfd28a5916e 100644 (file)
@@ -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)
index 54d5d5de8c7ddb57f74abe7fecb6c4229f28c618..59219c367fe5255d0e87983413cda76f9731cf77 100644 (file)
@@ -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;