]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: wakeup lease_cr after abort on bucket sync disable 26549/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 19 Feb 2019 13:37:18 +0000 (08:37 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 26 Feb 2019 18:08:29 +0000 (13:08 -0500)
the 'bucket sync disable' tests were causing data sync to lag behind
because these calls to lease_cr->abort() were still waiting for the
RGWContinuousLeaseCR to wake up from its sleep. added data sync
checkpoints to each 'bucket sync disable' test to make sure that data
sync catches up before running other tests, as this was causing failures
in the new 'datalog autotrim' test

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 14c430337bf1a7929f4e56f8e1a5ec3948d1c2cd)

Conflicts:
src/rgw/rgw_data_sync.cc: log tracing

src/rgw/rgw_data_sync.cc
src/test/rgw/rgw_multi/tests.py

index 04cb18163c14aa6e7ec3613dda6be4b0faf20e7b..2463b38de105354ba589d1a3aaf51f1b11de79ec 100644 (file)
@@ -3087,7 +3087,9 @@ int RGWRunBucketSyncCoroutine::operate()
         yield call(new RGWInitBucketShardSyncStatusCoroutine(sync_env, bs, sync_status));
         if (retcode == -ENOENT) {
           ldout(sync_env->cct, 0) << "bucket sync disabled" << dendl;
-          lease_cr->abort(); // deleted lease object, abort instead of unlock
+          lease_cr->abort(); // deleted lease object, abort/wakeup instead of unlock
+          lease_cr->wakeup();
+          lease_cr.reset();
           drain_all();
           return set_cr_done();
         }
index e5afe4e12971bcd3e45beed263d4469f1355c6de..1aba57227ea98557016f3749ac1114f7a0a5a87f 100644 (file)
@@ -994,6 +994,8 @@ def test_bucket_sync_disable():
     for zone in zonegroup.zones:
         check_buckets_sync_status_obj_not_exist(zone, buckets)
 
+    zonegroup_data_checkpoint(zonegroup_conns)
+
 def test_bucket_sync_enable_right_after_disable():
     zonegroup = realm.master_zonegroup()
     zonegroup_conns = ZonegroupConns(zonegroup)
@@ -1024,6 +1026,8 @@ def test_bucket_sync_enable_right_after_disable():
     for bucket_name in buckets:
         zonegroup_bucket_checkpoint(zonegroup_conns, bucket_name)
 
+    zonegroup_data_checkpoint(zonegroup_conns)
+
 def test_bucket_sync_disable_enable():
     zonegroup = realm.master_zonegroup()
     zonegroup_conns = ZonegroupConns(zonegroup)
@@ -1060,6 +1064,8 @@ def test_bucket_sync_disable_enable():
     for bucket_name in buckets:
         zonegroup_bucket_checkpoint(zonegroup_conns, bucket_name)
 
+    zonegroup_data_checkpoint(zonegroup_conns)
+
 def test_multipart_object_sync():
     zonegroup = realm.master_zonegroup()
     zonegroup_conns = ZonegroupConns(zonegroup)