Skip to content

Commit

Permalink
objecter: resend unfinished lingers when osdmap is no longer paused
Browse files Browse the repository at this point in the history
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: ceph#6070
Signed-off-by: Josh Durgin <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
(cherry picked from commit 38a0ca6)
  • Loading branch information
jdurgin committed Aug 21, 2013
1 parent 1670a73 commit 8551be3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/osdc/Objecter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,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++) {
Expand All @@ -593,6 +593,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++) {
Expand Down

0 comments on commit 8551be3

Please sign in to comment.