]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: multisite log trimming only checks peers that sync from us 27567/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 12 Apr 2019 20:30:19 +0000 (16:30 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 12 Apr 2019 20:36:14 +0000 (16:36 -0400)
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 <cbodley@redhat.com>
src/rgw/rgw_data_sync.cc
src/rgw/rgw_sync_log_trim.cc

index 1ace67d990714ce960e7c4979b4533a8b7c0817d..6c8d4236cd1653160d46fc41ac1021262cfe54d3 100644 (file)
@@ -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<rgw_data_sync_status>;
         spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p),
index f35e2caf762c66bab375e3f8356731b078b0e516..53aa8e10aa90c35e7525d345140f63c7e532de1f 100644 (file)
@@ -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<StatusShards>;
         spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p),
               false);