mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
osd: wait based on min_epoch
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
52cb536077
commit
9cde71f243
@ -6361,7 +6361,7 @@ void OSD::dispatch_session_waiting(Session *session, OSDMapRef osdmap)
|
||||
assert(ms_can_fast_dispatch(op->get_req()));
|
||||
const MOSDFastDispatchOp *m = static_cast<const MOSDFastDispatchOp*>(
|
||||
op->get_req());
|
||||
if (m->get_map_epoch() > osdmap->get_epoch()) {
|
||||
if (m->get_min_epoch() > osdmap->get_epoch()) {
|
||||
break;
|
||||
}
|
||||
session->waiting_on_map.erase(i++);
|
||||
|
@ -3452,7 +3452,7 @@ void PG::requeue_map_waiters()
|
||||
epoch_t epoch = get_osdmap()->get_epoch();
|
||||
auto p = waiting_for_map.begin();
|
||||
while (p != waiting_for_map.end()) {
|
||||
if (op_must_wait_for_map(epoch, p->second.front())) {
|
||||
if (epoch < p->second.front()->min_epoch) {
|
||||
dout(20) << __func__ << " " << p->first << " front op "
|
||||
<< p->second.front() << " must still wait, doing nothing"
|
||||
<< dendl;
|
||||
|
@ -1564,9 +1564,9 @@ void PrimaryLogPG::do_request(
|
||||
op->mark_delayed("waiting_for_map not empty");
|
||||
return;
|
||||
}
|
||||
if (op_must_wait_for_map(get_osdmap()->get_epoch(), op)) {
|
||||
dout(20) << __func__ << " queue on waiting_for_map "
|
||||
<< op->get_source() << dendl;
|
||||
if (!have_same_or_newer_map(op->min_epoch)) {
|
||||
dout(20) << __func__ << " min " << op->min_epoch
|
||||
<< ", queue on waiting_for_map " << op->get_source() << dendl;
|
||||
waiting_for_map[op->get_source()].push_back(op);
|
||||
op->mark_delayed("op must wait for map");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user