]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: append obj: prevent tail from being GC'ed 33511/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 24 Feb 2020 14:32:01 +0000 (15:32 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Tue, 25 Feb 2020 09:55:47 +0000 (10:55 +0100)
append object tail gets GC'ed otherwise as the state has a manifest similar to
atomic obj processor, but if the manifest exists and the position is correct, it
is not an overwrite and shouldn't be GC'ed

Fixes: https://tracker.ceph.com/issues/42670
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_putobj_processor.cc

index 109c491880fd87936fd81d57b1553a8d0e7f53b1..2f51ff526761beac4de448c33aa741e5857796e0 100644 (file)
@@ -563,6 +563,7 @@ int AppendObjectProcessor::prepare(optional_yield y)
     }
     cur_manifest = &(*astate->manifest);
     manifest.set_prefix(cur_manifest->get_prefix());
+    astate->keep_tail = true;
   }
   manifest.set_multipart_part_rule(store->ctx()->_conf->rgw_obj_stripe_size, cur_part_num);