Bug #80897
openrgw: a CompleteMultipartUpload that loses the head race leaks its parts
0%
Description
Found with a formal model of RGW overwrites and multipart uploads P model, and reproduced on main at 44d50f6abb9 on a single-host vstart cluster, except where noted. By code review the same code is in tentacle, except where noted. The reproducers need a radosgw built with injection points. The workunit qa workunit sets its own knobs with ceph config set (qa/workunits/rgw/run-overwrite-races.sh <case>), deletes every key, runs radosgw-admin gc process --include-all, and expects no RADOS object of the bucket to remain.
_do_write_meta answers a lost race as success with meta.canceled set, and RadosMultipartUpload::complete ignores meta.canceled. The cancel removes the parts' index entries and the caller deletes the meta object, so nothing names the part objects any more, and nothing collects them.
Reproducer: qa workunit case test_losing_complete. A PutObject and a completion of an existing key are both held at write_meta_before_head_write, and the PutObject wins. The upload's two parts, four RADOS objects, remain after cleanup and GC.
Proposed fix: send a canceled completion's parts to GC under the upload id, as an abort does. It depends on U9's fix, so that a canceled write always means the head was not written.
KB Updated by Kyle Bader 2 months ago
- Pull request ID set to 72098
MH Updated by Matthew Heler 2 months ago
- Status changed from New to Fix Under Review
- Assignee set to Kyle Bader
- Backport changed from tentacle to tentacle, umbrella