diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index e92dbc505a6..948b97f7c1c 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1912,7 +1912,7 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, string cur_change_key; encode_obj_index_key(cur_change.key, &cur_change_key); int ret = cls_cxx_map_get_val(hctx, cur_change_key, &cur_disk_bl); - if (ret < 0 && ret != -ENOENT) + if (ret < 0) return -EINVAL; if (cur_disk_bl.length()) { @@ -1969,18 +1969,6 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, } break; case CEPH_RGW_UPDATE: - if (!cur_disk.exists) { - // this update would only have been sent by the rgw client - // if the rgw_bucket_dir_entry existed, however between that - // check and now the entry has diappeared, so we were likely - // in the midst of a delete op, and we will not recreate the - // entry - CLS_LOG(10, - "CEPH_RGW_UPDATE not applied because rgw_bucket_dir_entry" - " no longer exists\n"); - break; - } - CLS_LOG(10, "CEPH_RGW_UPDATE name=%s instance=%s total_entries: %" PRId64 " -> %" PRId64 "\n", cur_change.key.name.c_str(), cur_change.key.instance.c_str(), stats.num_entries, stats.num_entries + 1);