Assert that we're not trimming the PG log past last_complete.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
{
// trim?
if (trim_to > log.tail) {
+ // We shouldn't be trimming the log past last_complete
+ assert(trim_to >= info.last_complete);
+
dout(10) << "trim " << log << " to " << trim_to << dendl;
log.trim(t, trim_to);
info.log_tail = log.tail;
pg_trim_to = min_last_complete_ondisk;
assert(pg_trim_to <= log.head);
}
- } else
+ } else {
+ // don't trim
pg_trim_to = eversion_t();
+ }
}
/** do_op - do an op