summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_reshard.cc
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2017-05-18 20:51:21 +0200
committerYehuda Sadeh <yehuda@redhat.com>2017-06-05 22:18:00 +0200
commitf2b0eb08636f0ea055dd6cd94faf2065a9e14f9c (patch)
treec7772fef3ba2b59ec3034be05d4e602220af3968 /src/rgw/rgw_reshard.cc
parentrgw: add bucket to resharding queue if needs resharding (diff)
downloadceph-f2b0eb08636f0ea055dd6cd94faf2065a9e14f9c.tar.xz
ceph-f2b0eb08636f0ea055dd6cd94faf2065a9e14f9c.zip
rgw: replace reshard blocking sleep with interruptible condition wait
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/rgw/rgw_reshard.cc')
-rw-r--r--src/rgw/rgw_reshard.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc
index faa15080f2d..a80291d09d1 100644
--- a/src/rgw/rgw_reshard.cc
+++ b/src/rgw/rgw_reshard.cc
@@ -243,7 +243,7 @@ int RGWBucketReshard::set_resharding_status(const string& new_instance_id, int32
int RGWBucketReshard::clear_resharding()
{
cls_rgw_bucket_instance_entry instance_entry;
-
+
int ret = store->bucket_set_reshard(bucket_info, instance_entry);
if (ret < 0) {
ldout(store->ctx(), 0) << "RGWReshard::" << __func__ << " ERROR: error setting bucket resharding flag on bucket index: "
@@ -710,7 +710,6 @@ int RGWReshardWait::block_while_resharding(RGWRados::BucketShard *bs, string *ne
return -ERR_BUSY_RESHARDING;
}
-
int RGWReshard::process_single_logshard(int logshard_num)
{
string marker;
@@ -719,7 +718,7 @@ int RGWReshard::process_single_logshard(int logshard_num)
CephContext *cct = store->ctx();
int max_entries = 1000;
int max_secs = 60;
-
+
rados::cls::lock::Lock l(reshard_lock_name);
utime_t time(max_secs, 0);