Add assert() to make sure same_interval_since isn't too far forward
Fixes: #12387
Signed-off-by: David Zafman <dzafman@redhat.com>
*end = info.history.same_interval_since;
} else {
// PG must be imported, so let's calculate the whole range.
- *end = osd->get_superblock().newest_map;
+ *end = osdmap_ref->get_epoch();
}
// Do we already have the intervals we want?
pg_interval_t& i = (*past_intervals)[same_interval_since];
i.first = same_interval_since;
i.last = osdmap->get_epoch() - 1;
+ assert(i.first <= i.last);
i.acting = old_acting;
i.up = old_up;
i.primary = old_acting_primary;