New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw/notification: remove non x-amz-meta-* attributes from bucket notifications #51308
Conversation
Tests look good. An example: |
the notifications feature has automated tests; could we add such a test there? |
will do |
src/rgw/driver/rados/rgw_notify.cc
Outdated
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the condition for being a metadata attribute is in line 646:
boost::algorithm::starts_with(attr.first, RGW_ATTR_META_PREFIX)
also, not clear to me how these attributes get into the reservation object in the first place. since the above condition should make sure only metadata attributes are inserted to the map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the map isn't general, then yes, it would be preferable to not add them ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made the changes to stop populating non-metadata attributes to the reservation object
694fbb1
to
fb899c3
Compare
It looks we don't need a new test case for this. I just added metadata checking in |
…a section of the regular notifications Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
fb899c3
to
4ca7643
Compare
@mattbenjamin, @yuvalif, it looks like the failure in |
jenkins test api |
Do not populate
x-amz-meta-*
attributes to themetadata
section of the notification events.Fixes: https://tracker.ceph.com/issues/59592
Signed-off-by: Jane Zhu jzhu116@bloomberg.net
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows