From: Abhishek Lekshmanan Date: Thu, 9 May 2019 17:38:43 +0000 (+0200) Subject: rgw_lc: use a new bl while encoding RGW_ATTR_LC X-Git-Tag: v15.1.0~2403^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e23af175aff1d80a7857406f7c17f5a609ad7e5e;p=ceph.git rgw_lc: use a new bl while encoding RGW_ATTR_LC The current code seems to append the value to the bucket attr which isn't what we want Fixes: https://tracker.ceph.com/issues/39654 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index bea92b2b18bd..03a87758e996 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1357,7 +1357,11 @@ int RGWLC::set_bucket_config(RGWBucketInfo& bucket_info, RGWLifecycleConfiguration *config) { map attrs = bucket_attrs; - config->encode(attrs[RGW_ATTR_LC]); + bufferlist lc_bl; + config->encode(lc_bl); + + attrs[RGW_ATTR_LC] = std::move(lc_bl); + int ret = rgw_bucket_set_attrs(store, bucket_info, attrs, &bucket_info.objv_tracker); if (ret < 0) return ret;