We may receive a message that sat in a queue for a while with a low
priority and is tagged with an older epoch. Don't send a bunch of old
maps that we have already sent the peer.
Signed-off-by: Sage Weil <sage@redhat.com>
last_sent_epoch = session->last_sent_epoch;
session->sent_epoch_lock.unlock();
+ // assume the peer has the newer of the op's sent_epoch and what
+ // we think we sent them.
+ epoch_t from = std::max(last_sent_epoch, op->sent_epoch);
+
const Message *m = op->get_req();
service.share_map(
m->get_source(),
m->get_connection().get(),
- op->sent_epoch,
+ from,
osdmap,
session ? &last_sent_epoch : NULL);