`conn` is per-source. last_zone just saved a lookup in a small map.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
return ret;
}
- rgw_zone_id last_zone;
-
for (auto& pipe : pipes) {
auto& szone = pipe.source.zone;
- if (last_zone != szone) {
- conn = store->svc()->zone->get_zone_conn(szone);
- if (!conn) {
- ldpp_dout(this, 0) << "connection object to zone " << szone << " does not exist" << dendl;
- return -EINVAL;
- }
- last_zone = szone;
+ auto conn = store->svc()->zone->get_zone_conn(szone);
+ if (!conn) {
+ ldpp_dout(this, 0) << "connection object to zone " << szone << " does not exist" << dendl;
+ return -EINVAL;
}
rgw_bucket_index_marker_info remote_info;
std::optional<rgw_zone_id> source_zone;
std::optional<rgw_bucket> source_bucket;
- RGWRESTConn* conn = nullptr;
std::unique_ptr<RGWSyncErrorLogger> error_logger =
std::make_unique<RGWSyncErrorLogger>(store, RGW_SYNC_ERROR_LOG_SHARD_PREFIX,
ERROR_LOGGER_SHARDS);