]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: fix stale entries in bucket indexes
authorlu.shasha <lu.shasha@aishu.cn>
Mon, 2 Dec 2024 09:10:23 +0000 (17:10 +0800)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Thu, 3 Apr 2025 21:04:14 +0000 (04:04 +0700)
commit84bfb1b9d5aa0e6b212e52f5b35da53dd608fa1e
tree4ea116184b263d3b25b30ab2bd573041c4d219e6
parent7ef96bcfd62c515d77ed210ab942213702505a41
rgw: fix stale entries in bucket indexes

If rados_osd_op_timeout is set, the primary osd is slow, the rgw_rados_operate for deleting the rgw head obj may return -ETIMEDOUT
rgw can't determine whether or not the delete succeeded, we shouldn't be calling index_op.complete_del or cancel()
Instead, we should leave that pending entry in the index so than bucket listing can recover with check_disk_state() and cls_rgw_suggest_changens()
When raced with another delete op, deleting the rgw head obj may return ENOENT, calling index_op.complete_del() instead of index_op.cancel()

Fixes: https://tracker.ceph.com/issues/58965
Signed-off-by: Shasha Lu <lu.shasha@aishu.cn>
(cherry picked from commit de9ce1e27322cdf5c1572a0b8eff4a33547757c0)
src/rgw/driver/rados/rgw_rados.cc