]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Use STANDARD storage class in objects appending operation when the
authorzhangzhiming <zhangzhm1@chinatelecom.cn>
Mon, 17 Jan 2022 10:08:29 +0000 (18:08 +0800)
committerzhangzhiming <zhangzhm1@chinatelecom.cn>
Mon, 17 Jan 2022 10:08:29 +0000 (18:08 +0800)
storage class attr of the object appended is empty.

Fixes: https://tracker.ceph.com/issues/53902
Signed-off-by: zhiming zhang <zhangzhm1@chinatelecom.cn>
src/rgw/rgw_putobj_processor.cc

index 80d39794c83018bcc37912d4f43f63c91e8f5d85..b1e8c9b88bf5fb5ab03a649d1c4e8afc5b102fd7 100644 (file)
@@ -571,6 +571,8 @@ int AppendObjectProcessor::prepare(optional_yield y)
     iter = astate->attrset.find(RGW_ATTR_STORAGE_CLASS);
     if (iter != astate->attrset.end()) {
       tail_placement_rule.storage_class = iter->second.to_str();
+    } else {
+      tail_placement_rule.storage_class = RGW_STORAGE_CLASS_STANDARD;
     }
     cur_manifest = &(*astate->manifest);
     manifest.set_prefix(cur_manifest->get_prefix());