Merge pull request #44338 from rzarzynski/wip-crimson-abort_on_LOST_REVERT

crimson/osd: explicitly abort on LOST_REVERT in PG log.

Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
Samuel Just 2021-12-17 01:58:58 -08:00 committed by GitHub
commit 498b312b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,6 +318,16 @@ void PGRecovery::on_local_recover(
const bool is_delete,
ceph::os::Transaction& t)
{
if (const auto &log = pg->get_peering_state().get_pg_log();
!is_delete &&
log.get_missing().is_missing(recovery_info.soid) &&
log.get_missing().get_items().find(recovery_info.soid)->second.need > recovery_info.version) {
assert(pg->is_primary());
if (const auto* latest = log.get_log().objects.find(recovery_info.soid)->second;
latest->op == pg_log_entry_t::LOST_REVERT) {
ceph_abort("mark_unfound_lost (LOST_REVERT) is not implemented yet");
}
}
pg->get_peering_state().recover_got(soid,
recovery_info.version, is_delete, t);