Skip to content

Commit

Permalink
rgw: make sure object's idtag is updated when available
Browse files Browse the repository at this point in the history
This change was originally submitted by lltlo <120680451@qq.com> but
had some formatting issues and wasn't signed-off.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
  • Loading branch information
ivancich committed Aug 29, 2019
1 parent 48d6afb commit 7d32b08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rgw/rgw_rados.cc
Expand Up @@ -5545,9 +5545,15 @@ int RGWRados::set_attrs(void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& sr
state->attrset.erase(iter->first);
}
}

for (iter = attrs.begin(); iter != attrs.end(); ++iter) {
state->attrset[iter->first] = iter->second;
}

auto iter = state->attrset.find(RGW_ATTR_ID_TAG);
if (iter != state->attrset.end()) {
iter->second = state->obj_tag;
}
}

return 0;
Expand Down

0 comments on commit 7d32b08

Please sign in to comment.