summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_reshard.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2018-11-24 04:33:05 +0100
committerCasey Bodley <cbodley@redhat.com>2018-11-30 20:37:03 +0100
commit10a398c7ef6a3800b2c103fdbda224821242b804 (patch)
treed286666afb32636315e7f032cc60e766da13eaa8 /src/rgw/rgw_reshard.cc
parentMerge pull request #25201 from jan--f/c-v-inventory-add-device_id (diff)
downloadceph-10a398c7ef6a3800b2c103fdbda224821242b804.tar.xz
ceph-10a398c7ef6a3800b2c103fdbda224821242b804.zip
rgw: use ceph::condition_variable in RGWReshardWait
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_reshard.cc')
-rw-r--r--src/rgw/rgw_reshard.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc
index 955ee536d3c..9d8b94efefe 100644
--- a/src/rgw/rgw_reshard.cc
+++ b/src/rgw/rgw_reshard.cc
@@ -863,13 +863,13 @@ int RGWReshard::clear_bucket_resharding(const string& bucket_instance_oid, cls_r
}
const int num_retries = 10;
-const int default_reshard_sleep_duration = 5;
+static const std::chrono::seconds default_reshard_sleep_duration(5);
int RGWReshardWait::do_wait()
{
- Mutex::Locker l(lock);
+ std::unique_lock lock(mutex);
- cond.WaitInterval(lock, utime_t(default_reshard_sleep_duration, 0));
+ cond.wait_for(lock, default_reshard_sleep_duration);
if (going_down) {
return -ECANCELED;