snap_trimmer causes replica crashes if the replica is missing
objects.
Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
if (pg->is_active()) {
// i am active
if (pg->is_primary() &&
- !pg->snap_trimq.empty())
+ !pg->snap_trimq.empty() &&
+ !pg->is_degraded())
pg->queue_snap_trim();
}
else if (pg->is_primary() &&
snap_trimq = pool->cached_removed_snaps;
snap_trimq.subtract(info.purged_snaps);
dout(10) << "activate - snap_trimq " << snap_trimq << dendl;
- if (!snap_trimq.empty())
+ if (!snap_trimq.empty() && !is_degraded())
queue_snap_trim();
}