]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: resend unfinished lingers when osdmap is no longer paused
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 21 Aug 2013 21:28:49 +0000 (14:28 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 21 Aug 2013 23:01:04 +0000 (16:01 -0700)
Plain Ops that haven't finished yet need to be resent if the osdmap
transitions from full or paused to unpaused.  If these Ops are
triggered by LingerOps, they will be cancelled instead (since
should_resend = false), but the LingerOps that triggered them will not
be resent.

Fix this by checking the registered flag for all linger ops, and
resending any of them that aren't paused anymore.

Fixes: #6070
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
src/osdc/Objecter.cc

index eb490cef33089d9d2c0ba45b72f10f98063141b3..5749f9fd7629b63bc69b8defa816ed5a86544c65 100644 (file)
@@ -625,10 +625,10 @@ void Objecter::handle_osd_map(MOSDMap *m)
   // was/is paused?
   if (was_pauserd || was_pausewr || pauserd || pausewr)
     maybe_request_map();
-  
+
   // unpause requests?
   if ((was_pauserd && !pauserd) ||
-      (was_pausewr && !pausewr))
+      (was_pausewr && !pausewr)) {
     for (map<tid_t,Op*>::iterator p = ops.begin();
         p != ops.end();
         ++p) {
@@ -638,6 +638,16 @@ void Objecter::handle_osd_map(MOSDMap *m)
          !((op->flags & CEPH_OSD_FLAG_WRITE) && pausewr))    // not still paused as a write
        need_resend[op->tid] = op;
     }
+    for (map<tid_t, LingerOp*>::iterator lp = linger_ops.begin();
+        lp != linger_ops.end();
+        ++lp) {
+      LingerOp *op = lp->second;
+      if (!op->registered &&
+         !pauserd &&                                      // not still paused as a read
+         !((op->flags & CEPH_OSD_FLAG_WRITE) && pausewr)) // not still paused as a write
+       need_resend_linger.push_back(op);
+    }
+  }
 
   // resend requests
   for (map<tid_t, Op*>::iterator p = need_resend.begin(); p != need_resend.end(); ++p) {