We need to share past_intervals whenever we instantiate the PG on a peer.
In the PG activation case, this is based on whether our peer_info[] value
for that peer is dne(). However, the backfill code was updating the
peer info (history) in the block preceeding the dne() check, which meant
we never shared past_intervals in this case and the peer would have to
chew through a potentially large number of maps if the PG has not been
clean recently.
Fix by checking dne() prior to the backfill block. We still need to fill
in the message later because it isn't yet instantiated.
Fixes: #2849
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
MOSDPGLog *m = 0;
pg_missing_t& pm = peer_missing[peer];
+ bool needs_past_intervals = pi.dne();
+
if (pi.last_update == info.last_update) {
// empty log
if (!pi.is_empty() && activator_map) {
}
// share past_intervals if we are creating the pg on the replica
- if (pi.dne())
+ // based on whether our info for that peer was dne() *before*
+ // updating pi.history in the backfill block above.
+ if (needs_past_intervals)
m->past_intervals = past_intervals;
if (pi.last_backfill != hobject_t::get_max())