]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #55162 from cfsnyder/wip-64014-cfsnyder-pacific
authorCasey Bodley <cbodley@users.noreply.github.com>
Fri, 2 Feb 2024 15:41:17 +0000 (15:41 +0000)
committerGitHub <noreply@github.com>
Fri, 2 Feb 2024 15:41:17 +0000 (15:41 +0000)
rgw: fix issue with concurrent versioned deletes leaving behind olh entries

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
1  2 
src/rgw/driver/rados/rgw_rados.cc

index fe0d14d1029ae182c9c96c4a20b7234aae7423e9,7d4a765cbba6ae02b8f9b9e58244e3ce3a04365d..b802bb114bd7fcc443a715c7c023b902b7c0c2f8
@@@ -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;