Bug #83295
openrgw: failed index update after the head write deletes the new object's data
0%
Description
RGWRados::Object::Write::_do_write_meta() writes the head object, sends the old object's tails to gc (complete_atomic_modification()), then completes the bucket index op and, in versioned buckets, calls set_olh(). If the index complete or set_olh() fails after the head is written, the write is treated as failed: AtomicObjectProcessor::complete() keeps its list of written objects (it clears it only on -ETIMEDOUT) and ~RadosWriter deletes the new tails that the committed head references. A GET of the object then fails reading the missing tails. On an overwrite, the old object's tails are already queued for gc, so the data of both objects is lost.
Reproduce on main in a versioned bucket with rgw_debug_inject_set_olh_err=2: a 6 MiB PUT fails with 404, the new instance stays in the bucket index with only its head object in the data pool, and GET ?versionId times out.
KC Updated by Krunal Chheda 13 days ago
- Related to Bug #80902: rgw: a failed bucket index completion undoes a write that already happened added
KC Updated by Krunal Chheda 13 days ago
- Status changed from New to Fix Under Review
- Pull request ID set to 74065