rgw: fix get_obj_state_impl wrongly set s->has_attrs = true#60957
rgw: fix get_obj_state_impl wrongly set s->has_attrs = true#60957
Conversation
Signed-off-by: Shasha Lu <lu.shasha@aishu.cn>
| if (r == -ENOENT) { | ||
| s->exists = false; | ||
| s->has_attrs = true; | ||
| s->has_attrs = false; |
There was a problem hiding this comment.
can you please clarify what breaks as a result of this?
looking back through git history, i see that it's been this way since 2011 though i'm not sure why: b03930f
There was a problem hiding this comment.
while upload a multipart,
1.the multipart obj data was written first
2.after all shadow obj has been written, will do write_meta for multipart obj, which only write some xatt
In RGWRados::Object::Write::write_meta, assume_noent is true, in RGWRados::get_obj_state_impl wouldnot actually do raw_obj_stat, only set s->exists = false, s->has_attrs = true
3.if write_meta write xattr failed, then ~RadosWriter() will remove those objs, when remove multipart obj. Because of s->has_attrs = true, s->exists = false, the delete_obj will return ENOENT, thus multipart obj leaked.
There was a problem hiding this comment.
actually i have no idea why https://github.com/ceph/ceph/commit/b03930fa02295f8068195f30312ff2d6fac50991 set s->has_attrs = true either?
|
jenkins test make check arm64 |
|
@shashalu Please fill out the checklist and add a tracker if need be. I've added this PR to a QA run. |
|
I believe this PR is causing this teuthology error, which can be found here: 2024-12-18T03:34:26.157 INFO:teuthology.orchestra.run.smithi122.stdout:=================================== FAILURES =================================== ... elided... 2024-12-18T03:34:26.159 INFO:teuthology.orchestra.run.smithi122.stdout:> assert body == content |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
i think there's still something to fix here. we may just need to work through the unintended consequences of the change |
|
Can one of the admins verify this patch? |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
rgw: fix get_obj_state_impl wrongly set s->has_attrs = true
While RGWRados::raw_obj_stat return ENOENT,
s->has_attrs shouldnot set to true
Signed-off-by: [Shasha Lu] lu.shasha@aishu.cn
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