diff options
author | Casey Bodley <cbodley@redhat.com> | 2024-07-17 16:28:08 +0200 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2024-07-17 16:28:10 +0200 |
commit | f433e2ff4568416619af4885314d43c621fb4db9 (patch) | |
tree | 2fcc4d855832c420dce1490997b23d964d9578a1 /src/rgw/driver/rados | |
parent | Merge pull request #57722 from sajibreadd/wip-62500 (diff) | |
download | ceph-f433e2ff4568416619af4885314d43c621fb4db9.tar.xz ceph-f433e2ff4568416619af4885314d43c621fb4db9.zip |
rgw/rados: set_attrs() falls back to existing attrs for index update
set_attrs() needs the ACLOwner, etag, content-type and storage class for
the bucket index update. if those attrs aren't being updated, consult
their existing attrs in state->attrset
Fixes: https://tracker.ceph.com/issues/64173
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/driver/rados')
-rw-r--r-- | src/rgw/driver/rados/rgw_rados.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index b010a63d443..74684bec1ee 100644 --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@ -6588,18 +6588,30 @@ int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBu ACLOwner owner; if (iter = attrs.find(RGW_ATTR_ACL); iter != attrs.end()) { (void) decode_policy(dpp, iter->second, &owner); + } else if (iter = state->attrset.find(RGW_ATTR_ACL); + iter != state->attrset.end()) { + (void) decode_policy(dpp, iter->second, &owner); } std::string etag; if (iter = attrs.find(RGW_ATTR_ETAG); iter != attrs.end()) { etag = rgw_bl_str(iter->second); + } else if (iter = state->attrset.find(RGW_ATTR_ETAG); + iter != state->attrset.end()) { + etag = rgw_bl_str(iter->second); } std::string content_type; if (iter = attrs.find(RGW_ATTR_CONTENT_TYPE); iter != attrs.end()) { content_type = rgw_bl_str(iter->second); + } else if (iter = state->attrset.find(RGW_ATTR_CONTENT_TYPE); + iter != state->attrset.end()) { + content_type = rgw_bl_str(iter->second); } string storage_class; if (iter = attrs.find(RGW_ATTR_STORAGE_CLASS); iter != attrs.end()) { storage_class = rgw_bl_str(iter->second); + } else if (iter = state->attrset.find(RGW_ATTR_STORAGE_CLASS); + iter != state->attrset.end()) { + storage_class = rgw_bl_str(iter->second); } uint64_t epoch = ioctx.get_last_version(); int64_t poolid = ioctx.get_id(); |