Skip to content

Commit

Permalink
Merge pull request ceph#60907 from shashalu/wip-fix-stale-bucket-indexes
Browse files Browse the repository at this point in the history
rgw: Delete stale entries in bucket indexes while deleting obj

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
ivancich authored Dec 11, 2024
2 parents 29d6eac + de9ce1e commit 7e6c5b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rgw/driver/rados/rgw_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 7e6c5b8

Please sign in to comment.