RGW: pubsub publish commit with etag populated#54569
Conversation
|
can you please add a test for etag in "MPU complete" to the test suite? |
|
please add: to the commit message |
c274296 to
a22bb01
Compare
a22bb01 to
a7d40a2
Compare
|
I think we still have an issue with etag not being populated in the main branch |
a7d40a2 to
2761671
Compare
|
please test against the rgw suite, as there are changes here unrelated to notifications |
2761671 to
81187ea
Compare
81187ea to
437f699
Compare
1564aa2 to
4e7f375
Compare
| uint64_t min_part_size = cct->_conf->rgw_multipart_min_part_size; | ||
| auto etags_iter = part_etags.begin(); | ||
| rgw::sal::Attrs attrs = target_obj->get_attrs(); | ||
| rgw::sal::Attrs& attrs = target_obj->get_attrs(); |
There was a problem hiding this comment.
@cbodley can you please see if this change has other implication?
There was a problem hiding this comment.
it's hard to tell. are we mutating the attrs? if not these should be const-refs instead
There was a problem hiding this comment.
yes we are mutating the attrs at line 2544:
attrs[RGW_ATTR_ETAG] = etag_bl;
if (compressed) {
// write compression attribute to full object
bufferlist tmp;
encode(cs_info, tmp);
attrs[RGW_ATTR_COMPRESSION] = tmp;
}
|
this looks like a successful teuthology run: |
|
jenkins test windows |
c45aa3e to
5900adb
Compare
5900adb to
66ba85c
Compare
Signed-off-by: Ali Masarwa <[email protected]>
66ba85c to
18c202c
Compare
|
I think this is a successful teuthology run: 3 failures unrelated to my change: can I merge? |
yes. please merge once "make check" passes |
|
jenkins test make check |
|
jenkins test make check arm64 |
This version refreshes object attrs after upload completes, which seems to be the smallest available fix. Appears to return the correct value for ETag. For 7.1, we could replace this fix with a validated backport of (at least) ceph/ceph#54569. This is a more intrusive change and original author should do the backport. Resolves: rhbz#2266579 Signed-off-by: matt benjamin <[email protected]>
| // remove the upload meta object ; the meta object is not versioned | ||
| // when the bucket is, as that would add an unneeded delete marker | ||
| int r = meta_obj->delete_object(this, y, true /* prevent versioning */); |
There was a problem hiding this comment.
before this moved to RGWCompleteMultipart::complete(), it was only being called on success. but complete() is called on errors too, so the change caused a regression in https://tracker.ceph.com/issues/65746
| int r = serializer->unlock(); | ||
| if (r < 0) { |
There was a problem hiding this comment.
this unlock() call wasn't here before, and i'm not sure why it was added. in the successful path where we call meta_obj->delete_object(), we shouldn't do a separate unlock() because delete_object() deletes the lock implicitly (that's why it uses serializer->clear_locked())
| // make reservation for notification if needed | ||
| std::unique_ptr<rgw::sal::Notification> res | ||
| = driver->get_notification(meta_obj.get(), nullptr, s, rgw::notify::ObjectCreatedCompleteMultipartUpload, y, &s->object->get_name()); | ||
| res = driver->get_notification(meta_obj.get(), nullptr, s, rgw::notify::ObjectCreatedCompleteMultipartUpload, y, |
There was a problem hiding this comment.
it seems wrong for the Notification to point at the meta_obj rather than the target_obj. that's probably why you were seeing lifetime issues around it?
|
@AliMasarweh @yuvalif please see fix/cleanup in #57257 |
This version refreshes object attrs after upload completes, which seems to be the smallest available fix. Appears to return the correct value for ETag. For 7.1, we could replace this fix with a validated backport of (at least) ceph#54569. This is a more intrusive change and original author should do the backport. Resolves: rhbz#2266579 Resolves: rhbz#2271117 Signed-off-by: matt benjamin <[email protected]>
Fixes: https://tracker.ceph.com/issues/63532
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. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e