}
result.version_id = marker.key.instance;
- if (result.version_id.empty())
+ if (result.version_id.empty()) {
result.version_id = "null";
+ }
result.delete_marker = true;
struct rgw_bucket_dir_entry_meta meta;
}
return 0;
- }
+ } // if versioned bucket
rgw_rados_ref ref;
int r = store->get_obj_head_ref(dpp, target->get_bucket_info(), obj, &ref);
RGWObjState *state;
RGWObjManifest *manifest = nullptr;
r = target->get_state(dpp, &state, &manifest, false, y);
- if (r < 0)
+ if (r < 0) {
return r;
+ }
ObjectWriteOperation op;
}
uint64_t obj_accounted_size = state->accounted_size;
- if(params.abortmp) {
+ if (params.abortmp) {
obj_accounted_size = params.parts_accounted_size;
}
}
r = target->prepare_atomic_modification(dpp, op, false, NULL, NULL, NULL, true, false, y);
- if (r < 0)
+ if (r < 0) {
return r;
+ }
RGWBucketInfo& bucket_info = target->get_bucket_info();
index_op.set_bilog_flags(params.bilog_flags | RGW_BILOG_NULL_VERSION);
}
-
r = index_op.prepare(dpp, CLS_RGW_OP_DEL, &state->write_tag, y);
- if (r < 0)
+ if (r < 0) {
return r;
+ }
store->remove_rgw_head_obj(op);
target->invalidate_state();
}
- if (r < 0)
+ if (r < 0) {
return r;
+ }
/* update quota cache */
store->quota_handler->update_stats(params.bucket_owner, obj.bucket, -1, 0, obj_accounted_size);
}
return 0;
-}
+} // bucket_index_unlink_instance
int RGWRados::bucket_index_read_olh_log(const DoutPrefixProvider *dpp,
RGWBucketInfo& bucket_info, RGWObjState& state,
return r;
}
-
if (need_to_remove) {
string olh_tag(state.olh_tag.c_str(), state.olh_tag.length());
r = clear_olh(dpp, obj_ctx, obj, bucket_info, ref, olh_tag, last_ver, y);
bilog_flags = bilog_flags | RGW_BILOG_FLAG_VERSIONED_OP;
}
- ret = bucket_index_unlink_instance(dpp, bucket_info, target_obj, op_tag, olh_tag, olh_epoch, y, bilog_flags, zones_trace, log_op);
+ ret = bucket_index_unlink_instance(dpp, bucket_info, target_obj,
+ op_tag, olh_tag, olh_epoch, y,
+ bilog_flags, 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;
+ ldpp_dout(dpp, 20) << "bucket_index_unlink_instance() target_obj=" <<
+ target_obj << " returned " << ret << dendl;
if (ret == -ECANCELED) {
continue;
}
ldpp_dout(dpp, 20) << "update_olh() target_obj=" << olh_obj << " returned " << r << dendl;
}
return ret;
- }
+ } // if error in bucket_index_unlink_instance call
break;
- }
+ } // cancel retry loop
if (i == MAX_ECANCELED_RETRY) {
ldpp_dout(dpp, 0) << "ERROR: exceeded max ECANCELED retries, aborting (EIO)" << dendl;
}
}
return ret;
-}
+} // delete_obj_aio
void objexp_hint_entry::generate_test_instances(list<objexp_hint_entry*>& o)
{