This shortcut was broken: we need to populate peer_missing with missing
objects in terms of the master log, not the peer's log (which may be old
or even divergent). This shortcut _only_ makes sense when the peer has
no missing in terms of a log that is perfectly up to date (i.e. matches
our last_update).
Reported-by: Henry Chang <henry.cy.chang@gmail.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
if (pi.is_empty())
continue;
if (peer_missing.find(peer) == peer_missing.end()) {
- if (pi.last_update == pi.last_complete) {
- dout(10) << " infering no missing (last_update==last_complete) for osd" << peer << dendl;
+ if (pi.last_update == pi.last_complete && // peer has no missing
+ pi.last_update == info.last_update) { // peer is up to date
+ // replica has no missing and identical log as us. no need to
+ // pull anything.
+ dout(10) << " infering up to date and no missing (last_update==last_complete) for osd" << peer << dendl;
peer_missing[peer].num_missing(); // just create the entry.
search_for_missing(peer_info[peer], &peer_missing[peer], peer);
continue;