From 3d52f30e6e11ccc22bce86c8c1e1054c6fdb97a6 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 12 Apr 2019 16:30:19 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_data_sync.cc | 4 ++-- src/rgw/rgw_sync_log_trim.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 1ace67d99071..6c8d4236cd16 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -3569,7 +3569,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) {} @@ -3592,7 +3592,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 f35e2caf762c..53aa8e10aa90 100644 --- a/src/rgw/rgw_sync_log_trim.cc +++ b/src/rgw/rgw_sync_log_trim.cc @@ -438,7 +438,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; @@ -462,7 +462,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); -- 2.47.3