summaryrefslogtreecommitdiffstats
path: root/src/rgw
diff options
context:
space:
mode:
authorJ. Eric Ivancich <ivancich@redhat.com>2024-12-11 23:58:28 +0100
committerGitHub <noreply@github.com>2024-12-11 23:58:28 +0100
commit7e6c5b8573955b5bdc5b6ca74aa5a06233a6f2cf (patch)
tree6bba05a532fb85027f6037e717703d972f3f04ea /src/rgw
parentMerge pull request #60916 from shashalu/fix-data-corruption-ETIMEDOUT (diff)
parentrgw: fix stale entries in bucket indexes (diff)
downloadceph-7e6c5b8573955b5bdc5b6ca74aa5a06233a6f2cf.tar.xz
ceph-7e6c5b8573955b5bdc5b6ca74aa5a06233a6f2cf.zip
Merge pull request #60907 from shashalu/wip-fix-stale-bucket-indexes
rgw: Delete stale entries in bucket indexes while deleting obj Reviewed-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw')
-rw-r--r--src/rgw/driver/rados/rgw_rados.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc
index 64b8b5836e9..2ba3559c006 100644
--- a/src/rgw/driver/rados/rgw_rados.cc
+++ b/src/rgw/driver/rados/rgw_rados.cc
@@ -6145,7 +6145,11 @@ int RGWRados::Object::Delete::delete_obj(optional_yield y, const DoutPrefixProvi
const bool need_invalidate = (r == -ECANCELED);
int64_t poolid = ioctx.get_id();
- if (r >= 0) {
+ if (r == -ETIMEDOUT) {
+ // rgw can't determine whether or not the delete succeeded, shouldn't be calling either of complete_del() or cancel()
+ // leaving that pending entry in the index so that bucket listing can recover with check_disk_state() and cls_rgw_suggest_changes()
+ ldpp_dout(dpp, 0) << "ERROR: rgw_rados_operate returned r=" << r << dendl;
+ } else if (r >= 0 || r == -ENOENT) {
tombstone_cache_t *obj_tombstone_cache = store->get_tombstone_cache();
if (obj_tombstone_cache) {
tombstone_entry entry{*state};