Skip to content

Commit

Permalink
rgw/notification: remove non x-amz-meta-* attributes from the metadat…
Browse files Browse the repository at this point in the history
…a section of the regular notifications

Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
  • Loading branch information
jzhu116-bloomberg authored and Juan Zhu committed May 1, 2023
1 parent e55ae79 commit 694fbb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rgw/driver/rados/rgw_notify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,11 @@ static inline void populate_event(reservation_t& res,
// either no metadata exist or no metadata filter was used
metadata_from_attributes(res, obj);
}
event.x_meta_map = res.x_meta_map;
std::copy_if(res.x_meta_map.cbegin(), res.x_meta_map.cend(),
std::inserter(event.x_meta_map, event.x_meta_map.end()),
[](const auto& m) {
return (m.first.rfind("x-amz-meta-", 0) == 0);
});
// pass tags
if (!res.tagset ||
(*res.tagset).get_tags().empty()) {
Expand Down

0 comments on commit 694fbb1

Please sign in to comment.