Skip to content

Commit 57f1b66

Browse files
authored
Merge pull request ceph#58649 from cbodley/wip-64173
rgw/rados: set_attrs() falls back to existing attrs for index update Reviewed-by: Shilpa Jagannath <[email protected]>
2 parents 832ba50 + f433e2f commit 57f1b66

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6588,18 +6588,30 @@ int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBu
65886588
ACLOwner owner;
65896589
if (iter = attrs.find(RGW_ATTR_ACL); iter != attrs.end()) {
65906590
(void) decode_policy(dpp, iter->second, &owner);
6591+
} else if (iter = state->attrset.find(RGW_ATTR_ACL);
6592+
iter != state->attrset.end()) {
6593+
(void) decode_policy(dpp, iter->second, &owner);
65916594
}
65926595
std::string etag;
65936596
if (iter = attrs.find(RGW_ATTR_ETAG); iter != attrs.end()) {
65946597
etag = rgw_bl_str(iter->second);
6598+
} else if (iter = state->attrset.find(RGW_ATTR_ETAG);
6599+
iter != state->attrset.end()) {
6600+
etag = rgw_bl_str(iter->second);
65956601
}
65966602
std::string content_type;
65976603
if (iter = attrs.find(RGW_ATTR_CONTENT_TYPE); iter != attrs.end()) {
65986604
content_type = rgw_bl_str(iter->second);
6605+
} else if (iter = state->attrset.find(RGW_ATTR_CONTENT_TYPE);
6606+
iter != state->attrset.end()) {
6607+
content_type = rgw_bl_str(iter->second);
65996608
}
66006609
string storage_class;
66016610
if (iter = attrs.find(RGW_ATTR_STORAGE_CLASS); iter != attrs.end()) {
66026611
storage_class = rgw_bl_str(iter->second);
6612+
} else if (iter = state->attrset.find(RGW_ATTR_STORAGE_CLASS);
6613+
iter != state->attrset.end()) {
6614+
storage_class = rgw_bl_str(iter->second);
66036615
}
66046616
uint64_t epoch = ioctx.get_last_version();
66056617
int64_t poolid = ioctx.get_id();

0 commit comments

Comments
 (0)