]> 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)
committerlu.shasha <lu.shasha@aishu.cn>
Wed, 4 Dec 2024 08:23:45 +0000 (16:23 +0800)
commitde9ce1e27322cdf5c1572a0b8eff4a33547757c0
tree9539a5901f75bcd2042adbd8ae0508ade25e542d
parent69c919838b4774559e407d3ce6a08d668c9b6f51
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>
src/rgw/driver/rados/rgw_rados.cc