Skip to content

Commit 8da4ba8

Browse files
authored
Merge pull request ceph#52960 from cbodley/wip-62411
rgw/lc: remove_bucket_config() doesn't update xattrs on bucket delete Reviewed-by Matt Benjamin <[email protected]>
2 parents 3b4ba8b + cebd5d5 commit 8da4ba8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/rgw/driver/rados/rgw_sal_rados.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,11 @@ int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
456456
}
457457

458458
// remove lifecycle config, if any (XXX note could be made generic)
459-
(void) store->getRados()->get_lc()->remove_bucket_config(
460-
this, get_attrs());
459+
if (get_attrs().count(RGW_ATTR_LC)) {
460+
constexpr bool merge_attrs = false; // don't update xattrs, we're deleting
461+
(void) store->getRados()->get_lc()->remove_bucket_config(
462+
this, get_attrs(), merge_attrs);
463+
}
461464

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

0 commit comments

Comments
 (0)