]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #33511 from theanalyst/rgw/append-gc-fixes
authorJ. Eric Ivancich <ivancich@redhat.com>
Mon, 8 Jun 2020 23:50:04 +0000 (19:50 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Jun 2020 23:50:04 +0000 (19:50 -0400)
rgw: append obj: prevent tail from being GC'ed

Reviewed-by: Casey Bodley <cbodley@redhat.com>
1  2 
src/rgw/rgw_putobj_processor.cc

index a08966c5e8dc83ce572f3e9a285a3ad092b567bc,2f51ff526761beac4de448c33aa741e5857796e0..94aab6778216d5c42f29886c4def8ac336e6edd2
@@@ -560,13 -561,9 +560,14 @@@ int AppendObjectProcessor::prepare(opti
        size_t pos = s.find("-");
        cur_etag = s.substr(0, pos);
      }
 +
 +    iter = astate->attrset.find(RGW_ATTR_STORAGE_CLASS);
 +    if (iter != astate->attrset.end()) {
 +      tail_placement_rule.storage_class = iter->second.to_str();
 +    }
      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);