Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infernalis: objecter: pool op callback may hang forever. #6627

Merged
merged 1 commit into from Feb 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/osdc/Objecter.cc
Expand Up @@ -3764,12 +3764,24 @@ void Objecter::handle_pool_op_reply(MPoolOpReply *m)
if (osdmap->get_epoch() < m->epoch) {
rwlock.unlock();
rwlock.get_write();
// recheck op existence since we have let go of rwlock
// (for promotion) above.
iter = pool_ops.find(tid);
if (iter == pool_ops.end())
goto done; // op is gone.
if (osdmap->get_epoch() < m->epoch) {
ldout(cct, 20) << "waiting for client to reach epoch " << m->epoch << " before calling back" << dendl;
_wait_for_new_map(op->onfinish, m->epoch, m->replyCode);
} else {
// map epoch changed, probably because a MOSDMap message
// sneaked in. Do caller-specified callback now or else
// we lose it forever.
assert(op->onfinish);
op->onfinish->complete(m->replyCode);
}
}
else {
assert(op->onfinish);
op->onfinish->complete(m->replyCode);
}
op->onfinish = NULL;
Expand All @@ -3784,6 +3796,8 @@ void Objecter::handle_pool_op_reply(MPoolOpReply *m)
} else {
ldout(cct, 10) << "unknown request " << tid << dendl;
}

done:
rwlock.unlock();

ldout(cct, 10) << "done" << dendl;
Expand Down