return 0;
}
+ /* Handle caching */
if (rule) {
if (!placement.empty()) {
*rule = &placement;
}
}
+ if (attrs) {
+ if (!cached_attrs.empty()) {
+ *attrs = cached_attrs;
+ if (!rule || *rule != nullptr)
+ return 0;
+ }
+ }
+
/* We need either attributes or placement, so we need a read */
std::unique_ptr<rgw::sal::Object> meta_obj;
meta_obj = get_meta_obj();
return ret;
}
+ /* Cache attrs filled in by prepare */
+ cached_attrs = meta_obj->get_attrs();
+
extract_span_context(meta_obj->get_attrs(), trace_ctx);
if (attrs) {
- /* Attrs are filled in by prepare */
- *attrs = meta_obj->get_attrs();
+ *attrs = cached_attrs;
if (!rule || *rule != nullptr) {
/* placement was cached; don't actually read */
return 0;
rgw_placement_rule placement;
RGWObjManifest manifest;
multipart_upload_info upload_information;
+ rgw::sal::Attrs cached_attrs;
public:
RadosMultipartUpload(RadosStore* _store, Bucket* _bucket, const std::string& oid,