From 6c031e1d30417b72727ab50d7f2e7e9ea0b7471a Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 19 Feb 2019 08:37:18 -0500 Subject: [PATCH] rgw: wakeup lease_cr after abort on bucket sync disable 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 (cherry picked from commit 14c430337bf1a7929f4e56f8e1a5ec3948d1c2cd) --- src/rgw/rgw_data_sync.cc | 4 +++- src/test/rgw/rgw_multi/tests.py | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 4f192eedc39e4..b0af04d91f257 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -3240,7 +3240,9 @@ int RGWRunBucketSyncCoroutine::operate() yield call(new RGWInitBucketShardSyncStatusCoroutine(sync_env, bs, sync_status)); if (retcode == -ENOENT) { tn->log(0, "bucket sync disabled"); - 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(); } diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index 472b79bcf3ff3..48bd12f51257b 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -1011,6 +1011,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) @@ -1041,6 +1043,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) @@ -1077,6 +1081,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) -- 2.39.5