summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-08-23 14:50:20 -0700
committerSamuel Just <sam.just@inktank.com>2013-08-23 14:57:45 -0700
commit60abe08037293b400cb6f4eb52683b24cf948fb1 (patch)
tree49d14b5f2a7651113866e08e9c9a91c476c04acc
parent7929228d564daee252e2cbfcd38ca9eb04b02c31 (diff)
downloadceph-60abe08037293b400cb6f4eb52683b24cf948fb1.tar.gz
ReplicatedPG: make watch timeout configurable
Fixes: #2354 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/common/config_opts.h1
-rw-r--r--src/osd/ReplicatedPG.cc3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index ce3b78ca52e..89405121698 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -243,6 +243,7 @@ OPTION(client_readahead_max_periods, OPT_LONGLONG, 4) // as multiple of file la
OPTION(client_snapdir, OPT_STR, ".snap")
OPTION(client_mountpoint, OPT_STR, "/")
OPTION(client_notify_timeout, OPT_INT, 10) // in seconds
+OPTION(osd_client_watch_timeout, OPT_INT, 30) // in seconds
OPTION(client_caps_release_delay, OPT_INT, 5) // in seconds
OPTION(client_oc, OPT_BOOL, true)
OPTION(client_oc_size, OPT_INT, 1024*1024* 200) // MB * n
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index fcdbb182d52..339673bf253 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -2821,8 +2821,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
dout(10) << "watch: peer_addr="
<< ctx->op->request->get_connection()->get_peer_addr() << dendl;
- // FIXME: where does the timeout come from?
- watch_info_t w(cookie, 30,
+ watch_info_t w(cookie, g_conf->osd_client_watch_timeout,
ctx->op->request->get_connection()->get_peer_addr());
if (do_watch) {
if (oi.watchers.count(make_pair(cookie, entity))) {