From f9145cac7473ef965ab63bfa1f708259b419ad59 Mon Sep 17 00:00:00 2001 From: Jane Zhu Date: Tue, 16 Jan 2024 23:52:02 -0500 Subject: [PATCH] rgw/lc: delete expired delete-marker when processing Expiration lc action with Days specified Signed-off-by: Juan Zhu --- src/rgw/rgw_lc.cc | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 4364c2e683c86..3dd8cb60e8f55 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1073,22 +1073,17 @@ public: return false; } if (o.is_delete_marker()) { - if (oc.next_key_name) { - std::string nkn = *oc.next_key_name; - if (oc.next_has_same_name(o.key.name)) { - ldpp_dout(dpp, 7) << __func__ << "(): dm-check SAME: key=" << o.key - << " next_key_name: %%" << nkn << "%% " - << oc.wq->thr_name() << dendl; - return false; - } else { - ldpp_dout(dpp, 7) << __func__ << "(): dm-check DELE: key=" << o.key - << " next_key_name: %%" << nkn << "%% " - << oc.wq->thr_name() << dendl; - *exp_time = real_clock::now(); - return true; - } + if (oc.next_has_same_name(o.key.name)) { + ldpp_dout(dpp, 7) << __func__ << "(): dm-check SAME: key=" << o.key + << " next_key_name: %%" << *oc.next_key_name << "%% " + << oc.wq->thr_name() << dendl; + return false; } - return false; + + ldpp_dout(dpp, 7) << __func__ << "(): dm-check DELE: key=" << o.key + << " " << oc.wq->thr_name() << dendl; + *exp_time = real_clock::now(); + return true; } auto& mtime = o.meta.mtime; -- 2.39.5