} else {
pmanifest = &astate->manifest;
tag = astate->obj_tag.c_str();
+
+ /* don't send the object's tail for garbage collection */
+ astate->keep_tail = true;
}
if (copy_first) {
int RGWRados::complete_atomic_overwrite(RGWRadosCtx *rctx, RGWObjState *state, rgw_obj& obj)
{
- if (!state || !state->has_manifest)
+ if (!state || !state->has_manifest || state->keep_tail)
return 0;
cls_rgw_obj_chain chain;
bool has_data;
bufferlist data;
bool prefetch_data;
+ bool keep_tail;
map<string, bufferlist> attrset;
RGWObjState() : is_atomic(false), has_attrs(0), exists(false),
size(0), mtime(0), epoch(0), fake_tag(false), has_manifest(false),
- has_data(false), prefetch_data(false) {}
+ has_data(false), prefetch_data(false), keep_tail(false) {}
bool get_attr(string name, bufferlist& dest) {
map<string, bufferlist>::iterator iter = attrset.find(name);