Merge pull request #55634 from cbodley/wip-64480

rgw: RGWSI_SysObj_Cache::remove() invalidates after successful delete

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
This commit is contained in:
Casey Bodley 2024-02-22 16:37:13 +00:00 committed by GitHub
commit ceeb9e5c1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,6 +89,11 @@ int RGWSI_SysObj_Cache::remove(const DoutPrefixProvider *dpp,
optional_yield y)
{
int r = RGWSI_SysObj_Core::remove(dpp, objv_tracker, obj, y);
if (r < 0) {
return r;
}
rgw_pool pool;
string oid;
normalize_pool_and_obj(obj.pool, obj.oid, pool, oid);
@ -97,12 +102,12 @@ int RGWSI_SysObj_Cache::remove(const DoutPrefixProvider *dpp,
cache.invalidate_remove(dpp, name);
ObjectCacheInfo info;
int r = distribute_cache(dpp, name, obj, info, INVALIDATE_OBJ, y);
r = distribute_cache(dpp, name, obj, info, INVALIDATE_OBJ, y);
if (r < 0) {
ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): failed to distribute cache: r=" << r << dendl;
}
} // not fatal
return RGWSI_SysObj_Core::remove(dpp, objv_tracker, obj, y);
return 0;
}
int RGWSI_SysObj_Cache::read(const DoutPrefixProvider *dpp,