From 3105034067dd4afba6ebaa9e30c6782854c9d1ad Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 21 Feb 2013 23:31:21 -0800 Subject: [PATCH] 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 --- src/osdc/Objecter.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 2cb6e555e7746..4bd34b5ef3256 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); } -- 2.39.5