When a shard is backfilling it gets given log entries
for partial writes even if they do not apply to the
shard. The code was updating the missing list but
discarding the log entry. This is wrong because the
update can be rolled backwards and the log entry is
required to revert the update to the missing list.
Keeping the log entry has a small but insignificant
performance impact.
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
(cherry picked from commit
1fa5302092cbbb37357142d01ca008cae29d4f5e)
invalidate_stats = invalidate_stats || !p->is_error();
if (log) {
ldpp_dout(dpp, 20) << "update missing, append " << *p << dendl;
- // Skip the log entry if it is a partial write that did not involve
- // this shard
- if (!pool.is_nonprimary_shard(shard) || p->is_written_shard(shard)) {
- log->add(*p);
- }
+ log->add(*p);
}
if (p->soid <= last_backfill &&
!p->is_error()) {