}
}
}
+ OSDMapRef get_next_osdmap() {
+ Mutex::Locker l(pre_publish_lock);
+ if (!next_osdmap)
+ return OSDMapRef();
+ return next_osdmap;
+ }
private:
Mutex peer_map_epoch_lock;
// connection to it when handling the new osdmap marking it down, and also
// resets the messenger sesssion when the replica reconnects. to avoid the
// out-of-order replies, the messages from that replica should be discarded.
- if (osd->get_osdmap()->is_down(from))
+ OSDMapRef next_map = osd->get_next_osdmap();
+ if (next_map->is_down(from))
return true;
/* Mostly, this overlaps with the old_peering_msg
* condition. An important exception is pushes
* sent by replicas not in the acting set, since
* if such a replica goes down it does not cause
* a new interval. */
- if (get_osdmap()->get_down_at(from) >= m->map_epoch)
+ if (next_map->get_down_at(from) >= m->map_epoch)
return true;
// same pg?