Add KeyValueStore op thread options

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This commit is contained in:
Haomai Wang 2014-02-21 22:48:00 +08:00
parent 62c1631f1d
commit a52d7cd03b
2 changed files with 8 additions and 6 deletions

View 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)

View 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;