RGW | fixed enqueueing the overwritten object for gc#64997
RGW | fixed enqueueing the overwritten object for gc#64997AliMasarweh merged 1 commit intoceph:mainfrom
Conversation
678462c to
97fa2ae
Compare
src/rgw/driver/rados/rgw_rados.cc
Outdated
| int r = get_state(dpp, &state, &manifest, false, y); | ||
| if (r < 0) | ||
| return r; |
There was a problem hiding this comment.
why do we need this? maybe this is why you're still needing to duplicate the get_state() call in complete_atomic_modification()?
There was a problem hiding this comment.
before my change prepare_atomic_modification was calling for get_state, I just moved it outside of it in the change of prepare_atomic_modification in the change RGW | fix conditional MultiWrite
if I don't call it in here, we would get a segmentation fault
97fa2ae to
dcee840
Compare
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
dcee840 to
69353cf
Compare
| int r = get_state(dpp, &state, &manifest, false, y); | ||
| if (r < 0) | ||
| return r; |
There was a problem hiding this comment.
can you help me understand why manifest would be null here? i would have assumed that _do_write_meta() initializes that with either version of:
- r = target->get_state(rctx.dpp, &target->state, &target->manifest, false, rctx.y);
- if (r < 0)
- return r;
+ target->manifest = manifest;
+ target->state = state;is there some code path that's calling complete_atomic_modification() but not _do_write_meta()?
There was a problem hiding this comment.
yes, it is called also by RGWRados::Object::Delete::delete_obj, but the issue is in the flow of _do_write_meta
somewhere in the code manifest is set to point to nullptr (both of the local manifest and target->manifest)
I still don't know where it is set to point to nullptr
There was a problem hiding this comment.
So, I looked at the history of this a bit. Before zipper changed manifests in
88bcacc23ab RGW - Zipper - remove RGWObjectCtx from SAL API
_do_write_meta() explicitly used a different state and manifest (since manifest was inside of state) than the one stored in RGWRados::Object. This was, presumably, the reason for the call to get_state at the start. This means that, by design, complete_atomic_modification was using a different copy of state (and manifest) than _do_write_meta was using. My changes in the above commit preserved that. The "conditional delete fix" commit added a get_state for the state in RGWRados::Object in there, so that check_preconditions could work.
So that's a change from how it was. If we want to use the RGWRados::Object version, we probably should just use that everywhere, rather than having copies at all, but I don't know the issues that might cause.
|
jenkins test make check |
|
jenkins test make check arm64 |
dang
left a comment
There was a problem hiding this comment.
I think we should merge the workaround, since it's passing, and then do an audit of manifest so find the root cause.
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker Update Log: https://github.com/ceph/ceph/actions/runs/17465158803 |
fixed enqueueing the overwritten object for gc in RGWRados::Object::complete_atomic_modification()
https://tracker.ceph.com/issues/72398
https://tracker.ceph.com/issues/72517
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 test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition