If the epoch cache says the osd has epoch 100 and the osd is asking for
epoch 200+, do not send it 100+.
Fixes: #10787
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
osd = req->get_source().num();
map<int,epoch_t>::iterator p = osd_epoch.find(osd);
if (p != osd_epoch.end()) {
- dout(10) << " osd." << osd << " should have epoch " << p->second << dendl;
- first = p->second + 1;
- if (first > osdmap.get_epoch())
- return;
+ if (first <= p->second) {
+ dout(10) << __func__ << " osd." << osd << " should already have epoch "
+ << p->second << dendl;
+ first = p->second + 1;
+ if (first > osdmap.get_epoch())
+ return;
+ }
}
}