From: Casey Bodley Date: Fri, 12 Apr 2019 20:30:19 +0000 (-0400) Subject: rgw: multisite log trimming only checks peers that sync from us X-Git-Tag: v14.2.2~142^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=00a1210cde5dff44f826570272a097d166b6bcf9;p=ceph.git rgw: multisite log trimming only checks peers that sync from us if there are peer zones in our zonegroup that do not sync from us, they won't have any sync status that corresponds to our logs. fetching their status will give us empty markers, so we'll never make progress with log trimming the get_zone_data_notify_to_map() contains only the zones that are configured to sync from us, so use that instead of get_zone_conn_map() Fixes: http://tracker.ceph.com/issues/39283 Signed-off-by: Casey Bodley (cherry picked from commit 3d52f30e6e11ccc22bce86c8c1e1054c6fdb97a6) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 90eb6bc2344..77b04bf985d 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -3547,7 +3547,7 @@ class DataLogTrimCR : public RGWCoroutine { : RGWCoroutine(store->ctx()), store(store), http(http), num_shards(num_shards), zone_id(store->svc.zone->get_zone().id), - peer_status(store->svc.zone->get_zone_conn_map().size()), + peer_status(store->svc.zone->get_zone_data_notify_to_map().size()), min_shard_markers(num_shards), last_trim(last_trim) {} @@ -3570,7 +3570,7 @@ int DataLogTrimCR::operate() }; auto p = peer_status.begin(); - for (auto& c : store->svc.zone->get_zone_conn_map()) { + for (auto& c : store->svc.zone->get_zone_data_notify_to_map()) { ldout(cct, 20) << "query sync status from " << c.first << dendl; using StatusCR = RGWReadRESTResourceCR; spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p), diff --git a/src/rgw/rgw_sync_log_trim.cc b/src/rgw/rgw_sync_log_trim.cc index cae02600477..db5c817e53b 100644 --- a/src/rgw/rgw_sync_log_trim.cc +++ b/src/rgw/rgw_sync_log_trim.cc @@ -440,7 +440,7 @@ class BucketTrimInstanceCR : public RGWCoroutine { http(http), observer(observer), bucket_instance(bucket_instance), zone_id(store->svc.zone->get_zone().id), - peer_status(store->svc.zone->get_zone_conn_map().size()) + peer_status(store->svc.zone->get_zone_data_notify_to_map().size()) {} int operate() override; @@ -464,7 +464,7 @@ int BucketTrimInstanceCR::operate() }; auto p = peer_status.begin(); - for (auto& c : store->svc.zone->get_zone_conn_map()) { + for (auto& c : store->svc.zone->get_zone_data_notify_to_map()) { using StatusCR = RGWReadRESTResourceCR; spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p), false);