summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@inktank.com>2013-02-21 23:31:21 -0800
committerJosh Durgin <josh.durgin@inktank.com>2013-02-21 23:33:46 -0800
commit3105034067dd4afba6ebaa9e30c6782854c9d1ad (patch)
tree8d54d82dfec1803f0262c42b2c48562a769eb81e
parent15bb9ba9fbb4185708399ed6deee070d888ef6d2 (diff)
downloadceph-3105034067dd4afba6ebaa9e30c6782854c9d1ad.tar.gz
objecter: don't resend linger ops unnecessarily
recalc_linger_op_target() was checking and then setting linger_op->pgid and linger_op->active, but these were only set by recalc_linger_op_target(). This was only called by handle_osd_map(), so the first osdmap after a watch was established would cause a resend of the watch. Analogous to the normal Op, set this information by calling recalc_linger_op_target in send_linger(). Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r--src/osdc/Objecter.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index 2cb6e555e77..4bd34b5ef32 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -287,6 +287,9 @@ void Objecter::send_linger(LingerOp *info)
info->register_tid = _op_submit(o);
} else {
// first send
+ // populate info->pgid and info->acting so we
+ // don't resend the linger op on the next osdmap update
+ recalc_linger_op_target(info);
info->register_tid = op_submit(o);
}