]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: don't resend linger ops unnecessarily
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 22 Feb 2013 07:31:21 +0000 (23:31 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Fri, 22 Feb 2013 07:33:46 +0000 (23:33 -0800)
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>
src/osdc/Objecter.cc

index 2cb6e555e7746e7baa7fc1cef3140096c29e5b5f..4bd34b5ef32563b4943a3882933f21ef2ffe365e 100644 (file)
@@ -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);
   }