]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Use STANDARD storage class in objects appending operation when the 59316/head
authorzhangzhiming <zhangzhm1@chinatelecom.cn>
Mon, 17 Jan 2022 10:08:29 +0000 (18:08 +0800)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Mon, 19 Aug 2024 16:32:22 +0000 (23:32 +0700)
storage class attr of the object appended is empty.

Fixes: https://tracker.ceph.com/issues/53902
Signed-off-by: zhiming zhang <zhangzhm1@chinatelecom.cn>
(cherry picked from commit 3662b22e87cd53b9a0045a42b3261ff58b78602d)

src/rgw/rgw_putobj_processor.cc

index 317b2c0cb2cb7f30450184c2f9123b6496abfd26..8b645f0129b9dadbcf3ac1a9469d2f0e23017101 100644 (file)
@@ -646,6 +646,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());