From: Casey Bodley Date: Fri, 2 Feb 2024 15:41:17 +0000 (+0000) Subject: Merge pull request #55162 from cfsnyder/wip-64014-cfsnyder-pacific X-Git-Tag: v19.1.0~374 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0359613a9fc6f022bebbd5f7ec7b779561b96c9e;p=ceph.git Merge pull request #55162 from cfsnyder/wip-64014-cfsnyder-pacific rgw: fix issue with concurrent versioned deletes leaving behind olh entries Reviewed-by: J. Eric Ivancich --- 0359613a9fc6f022bebbd5f7ec7b779561b96c9e diff --cc src/rgw/driver/rados/rgw_rados.cc index fe0d14d1029ae,7d4a765cbba6a..b802bb114bd7f --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@@ -8387,8 -8319,14 +8387,14 @@@ int RGWRados::unlink_obj_instance(cons } string olh_tag(state->olh_tag.c_str(), state->olh_tag.length()); + + if (cct->_conf->rgw_debug_inject_latency_bi_unlink) { + // simulates queue latency for unlink ops to validate behavior with + // concurrent delete requests for the same object version instance + std::this_thread::sleep_for(cct->_conf->rgw_debug_inject_latency_bi_unlink * std::chrono::seconds{1}); + } - ret = bucket_index_unlink_instance(dpp, bucket_info, target_obj, op_tag, olh_tag, olh_epoch, y, zones_trace); + ret = bucket_index_unlink_instance(dpp, bucket_info, target_obj, op_tag, olh_tag, olh_epoch, y, zones_trace, log_op); if (ret < 0) { olh_cancel_modification(dpp, bucket_info, *state, olh_obj, op_tag, y); ldpp_dout(dpp, 20) << "bucket_index_unlink_instance() target_obj=" << target_obj << " returned " << ret << dendl;