}
}
-bool RGWBucketSyncPolicyHandler::bucket_exports_object(const std::string& obj_name, const RGWObjTags* tags) const {
+bool RGWBucketSyncPolicyHandler::bucket_exports_object(const std::string& obj_name, const RGWObjTags& tags) const {
if (bucket_exports_data()) {
for (auto& entry : target_pipes.pipe_map) {
auto& filter = entry.second.params.source.filter;
- if (filter.check_prefix(obj_name) &&
- (tags == nullptr || filter.check_tags(tags->get_tags()))) {
+ if (filter.check_prefix(obj_name) && filter.check_tags(tags.get_tags())) {
return true;
}
}
return target_hints;
}
- bool bucket_exports_object(const std::string& obj_name, const RGWObjTags* tags) const;
+ bool bucket_exports_object(const std::string& obj_name, const RGWObjTags& tags) const;
bool bucket_exports_data() const;
bool bucket_imports_data() const;
ldpp_dout(this, 0) << "failed to read sync policy for bucket: " << s->bucket << dendl;
return;
}
- if (policy_handler && policy_handler->bucket_exports_object(s->object->get_name(), obj_tags.get())) {
+ if (policy_handler && policy_handler->bucket_exports_object(s->object->get_name(), obj_tags)) {
bufferlist repl_bl;
repl_bl.append("PENDING");
emplace_attr(RGW_ATTR_OBJ_REPLICATION_STATUS, std::move(repl_bl));