if they have already been read while reading permissions
for an object.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
int D4NFilterObject::get_obj_attrs_from_cache(const DoutPrefixProvider* dpp, optional_yield y)
{
+ //if attrs have already been set due to a previous call, do not read again.
+ if (attrs_read_from_cache) {
+ return true;
+ }
+
std::string head_oid_in_cache;
rgw::sal::Attrs attrs;
rgw::d4n::CacheBlock block;
if (ret < 0) {
ldpp_dout(dpp, 0) << "D4NFilterObject::" << __func__ << "(): D4NFilterObject set_attrs method failed." << dendl;
}
+ attrs_read_from_cache = true;
} // if found_in_cache = true
return found_in_cache;
bool delete_marker{false};
bool exists_in_cache{false};
bool load_from_store{false};
+ bool attrs_read_from_cache{false};
public:
struct D4NFilterReadOp : FilterReadOp {