You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -435,14 +433,12 @@ int D4NFilterObject::D4NFilterReadOp::prepare(optional_yield y, const DoutPrefix
435
433
}
436
434
437
435
//versioned objects have instance set to versionId, and get_oid() returns oid containing instance, hence using id tag as version for non versioned objects only
438
-
if (! this->source->have_instance()) {
439
-
RGWObjState* state = nullptr;
440
-
if (this->source->get_obj_state(dpp, &state, y) == 0) {
441
-
auto it = state->attrset.find(RGW_ATTR_ID_TAG);
442
-
if (it != state->attrset.end()) {
443
-
bufferlist bl = it->second;
444
-
this->source->set_object_version(bl.c_str());
445
-
ldpp_dout(dpp, 20) << __func__ << "id tag version is: " << this->source->get_object_version() << dendl;
436
+
if (! source->have_instance()) {
437
+
if (source->load_obj_state(dpp, y) == 0) {
438
+
bufferlist bl;
439
+
if (source->get_attr(RGW_ATTR_ID_TAG, bl)) {
440
+
source->set_object_version(bl.c_str());
441
+
ldpp_dout(dpp, 20) << __func__ << "id tag version is: " << source->get_object_version() << dendl;
446
442
} else {
447
443
ldpp_dout(dpp, 20) << __func__ << "Failed to find id tag" << dendl;
448
444
}
@@ -942,22 +938,21 @@ int D4NFilterWriter::complete(size_t accounted_size, const std::string& etag,
942
938
rgw::sal::Attrs baseAttrs = obj->get_attrs();
943
939
rgw::sal::Attrs attrs_temp = baseAttrs;
944
940
buffer::list bl;
945
-
RGWObjState* astate;
946
-
obj->get_obj_state(save_dpp, &astate, rctx.y);
941
+
obj->load_obj_state(save_dpp, rctx.y);
947
942
948
943
bl.append(to_iso_8601(obj->get_mtime()));
949
944
baseAttrs.insert({"mtime", bl});
950
945
bl.clear();
951
946
952
-
bl.append(std::to_string(obj->get_obj_size()));
947
+
bl.append(std::to_string(obj->get_size()));
953
948
baseAttrs.insert({"object_size", bl});
954
949
bl.clear();
955
950
956
951
bl.append(std::to_string(accounted_size));
957
952
baseAttrs.insert({"accounted_size", bl});
958
953
bl.clear();
959
954
960
-
bl.append(std::to_string(astate->epoch));
955
+
bl.append(std::to_string(obj->get_epoch()));
961
956
baseAttrs.insert({"epoch", bl});
962
957
bl.clear();
963
958
@@ -973,7 +968,7 @@ int D4NFilterWriter::complete(size_t accounted_size, const std::string& etag,
973
968
974
969
auto iter = attrs_temp.find(RGW_ATTR_SOURCE_ZONE);
0 commit comments