Bug #80903
openrgw: a write that stalls past the pending-op expiry is lost from the bucket index
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.
A listing that finds a write's index op pending for longer than rgw_pending_bucket_index_op_expiration (120 s) drops the op, and rewrites the entry from the head it reads, which may still be the old object. The stalled write then writes its head. Its index completion fails with -EINVAL because the tag is gone, and nothing checks that error, since the completion is asynchronous. The index keeps listing the old object.
Reproducer: s3-tests test_listing_during_stalled_put s3-tests commit. RGW config: rgw_inject_delay_pattern = write_meta_before_head_write and rgw_inject_delay_sec = 30, with rgw_pending_bucket_index_op_expiration = 5 on the OSDs. After the PutObject returns, ListObjectsV2 reports the old ETag while HeadObject reports the new one.
Fix: open. One option: cls_rgw applies a completion whose pending op has expired, if its epoch is newer than the entry's.
KB Updated by Kyle Bader 2 months ago
- Pull request ID set to 72102
MH Updated by Matthew Heler 2 months ago
- Assignee set to Kyle Bader
- Backport changed from tentacle to tentacle, umbrella
MH Updated by Matthew Heler 2 months ago
- Status changed from New to Fix Under Review