Skip to content

Commit

Permalink
OSD: add command_wq suicide timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit df4e5de)

Conflicts:
	src/common/config_opts.h
Trivial merge conflict
  • Loading branch information
athanatos authored and theanalyst committed Jul 15, 2015
1 parent 059a579 commit ad5745b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -579,6 +579,7 @@ OPTION(osd_remove_thread_suicide_timeout, OPT_INT, 10*60*60)
OPTION(osd_command_thread_timeout, OPT_INT, 10*60)
OPTION(osd_age, OPT_FLOAT, .8)
OPTION(osd_age_time, OPT_INT, 0)
OPTION(osd_command_thread_suicide_timeout, OPT_INT, 15*60)
OPTION(osd_heartbeat_addr, OPT_ADDR, entity_addr_t())
OPTION(osd_heartbeat_interval, OPT_INT, 6) // (seconds) how often we ping peers
OPTION(osd_heartbeat_grace, OPT_INT, 20) // (seconds) how long before we decide a peer has failed
Expand Down
6 changes: 5 additions & 1 deletion src/osd/OSD.cc
Expand Up @@ -1565,7 +1565,11 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
pg_stat_queue_lock("OSD::pg_stat_queue_lock"),
osd_stat_updated(false),
pg_stat_tid(0), pg_stat_tid_flushed(0),
command_wq(this, cct->_conf->osd_command_thread_timeout, &command_tp),
command_wq(
this,
cct->_conf->osd_command_thread_timeout,
cct->_conf->osd_command_thread_suicide_timeout,
&command_tp),
recovery_ops_active(0),
recovery_wq(
this,
Expand Down
4 changes: 2 additions & 2 deletions src/osd/OSD.h
Expand Up @@ -1944,8 +1944,8 @@ class OSD : public Dispatcher,
list<Command*> command_queue;
struct CommandWQ : public ThreadPool::WorkQueue<Command> {
OSD *osd;
CommandWQ(OSD *o, time_t ti, ThreadPool *tp)
: ThreadPool::WorkQueue<Command>("OSD::CommandWQ", ti, 0, tp), osd(o) {}
CommandWQ(OSD *o, time_t ti, time_t si, ThreadPool *tp)
: ThreadPool::WorkQueue<Command>("OSD::CommandWQ", ti, si, tp), osd(o) {}

bool _empty() {
return osd->command_queue.empty();
Expand Down

0 comments on commit ad5745b

Please sign in to comment.