Skip to content

Commit e7a97d0

Browse files
committed
rgw/lc: remove_bucket_config() doesn't update xattrs on bucket delete
we're deleting the bucket instance metadata anyway, so there's no reason to send an additional write to remove the RGW_ATTR_LC xattr first. this write bumps the cls_version and can cause the actual delete op to fail with ECANCELED Fixes: https://tracker.ceph.com/issues/62411 Signed-off-by: Casey Bodley <[email protected]>
1 parent 875dae7 commit e7a97d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rgw/driver/rados/rgw_sal_rados.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,9 @@ int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
451451
}
452452

453453
// remove lifecycle config, if any (XXX note could be made generic)
454+
constexpr bool merge_attrs = false; // don't update xattrs, we're deleting
454455
(void) store->getRados()->get_lc()->remove_bucket_config(
455-
this, get_attrs());
456+
this, get_attrs(), merge_attrs);
456457

457458
ret = store->ctl()->bucket->sync_user_stats(dpp, info.owner, info, y, nullptr);
458459
if (ret < 0) {

0 commit comments

Comments
 (0)