diff options
author | Xuehan Xu <xuxuehan@qianxin.com> | 2024-11-21 09:22:47 +0100 |
---|---|---|
committer | Matan Breizman <mbreizma@redhat.com> | 2025-01-05 17:22:12 +0100 |
commit | fa7ef62d2c6759caac3edf89438fec381bd2e755 (patch) | |
tree | c1342f5242e939244d99649d9f71972cbc0ce0ac /src/crimson | |
parent | crimson/osd/replicate_backend: add standalone delete to the push queue (diff) | |
download | ceph-fa7ef62d2c6759caac3edf89438fec381bd2e755.tar.xz ceph-fa7ef62d2c6759caac3edf89438fec381bd2e755.zip |
crimson/osd/replicated_recovery_backend: ignore the recovery of delete
objects
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
Diffstat (limited to 'src/crimson')
-rw-r--r-- | src/crimson/osd/replicated_recovery_backend.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crimson/osd/replicated_recovery_backend.cc b/src/crimson/osd/replicated_recovery_backend.cc index 31f05836b8e..e969ea17a31 100644 --- a/src/crimson/osd/replicated_recovery_backend.cc +++ b/src/crimson/osd/replicated_recovery_backend.cc @@ -35,6 +35,15 @@ ReplicatedRecoveryBackend::recover_object( logger().debug("recover_object: loading obc: {}", soid); return pg.obc_loader.with_obc<RWState::RWREAD>(soid, [this, soid, need](auto head, auto obc) { + if (!obc->obs.exists) { + // XXX: this recovery must be triggered by backfills and the corresponding + // object must have been deleted by some client request after the object + // is enqueued for push but before the lock is acquired by the recovery. + // + // Abort the recovery in this case, a "recover_delete" must have been + // added for this object by the client request that deleted it. + return interruptor::now(); + } logger().debug("recover_object: loaded obc: {}", obc->obs.oi.soid); auto& recovery_waiter = get_recovering(soid); recovery_waiter.obc = obc; |