]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cls/rgw: index cancelation still cleans up remove_objs
authorCasey Bodley <cbodley@redhat.com>
Tue, 9 Nov 2021 02:24:52 +0000 (21:24 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 15 Nov 2021 18:16:05 +0000 (13:16 -0500)
commit8b27472bbd8a22372cd14c0c5603ee41056a3343
treeba26ebb1a40f090c61291c9e1d4e4e95b404728f
parentf3325fc76fef97001f31142ce51c140e549c43bb
cls/rgw: index cancelation still cleans up remove_objs

when multipart uploads complete their final bucket index transaction,
they pass the list of part objects in 'remove_objs' for bulk removal -
the part objects, along with their bucket stats, get replaced by the
head object

but if CompleteMultipart races with another upload, the head object
write will fail with ECANCELED and the bucket index transaction gets
canceled with CLS_RGW_OP_CANCEL. these canceled uploads still need to
clean up their 'remove_objs', but cancelation was returning too early.
as a result, these bucket index entries get orphaned and leave the
bucket stats inconsistent

this commit reworks rgw_bucket_complete_op() so that CLS_RGW_OP_CANCEL
is handled the same way as OP_ADD and OP_DEL, so always runs the loop to
clean up 'remove_objs'

Fixes: https://tracker.ceph.com/issues/53199
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/cls/rgw/cls_rgw.cc