From: Yehuda Sadeh Date: Wed, 30 Nov 2016 00:44:29 +0000 (-0800) Subject: rgw: set duration for lifecycle lease X-Git-Tag: v11.1.0~92^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12231%2Fhead;p=ceph.git rgw: set duration for lifecycle lease Fixes: http://tracker.ceph.com/issues/17965 Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 772e1e773462..5b07c5990af8 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -342,8 +342,12 @@ int RGWLC::bucket_lc_process(string& shard_id) int RGWLC::bucket_lc_post(int index, int max_lock_sec, cls_rgw_lc_obj_head& head, pair& entry, int& result) { + utime_t lock_duration(cct->_conf->rgw_lc_lock_max_time, 0); + rados::cls::lock::Lock l(lc_index_lock_name); l.set_cookie(cookie); + l.set_duration(lock_duration); + do { int ret = l.lock_exclusive(&store->lc_pool_ctx, obj_names[index]); if (ret == -EBUSY) { /* already locked by another lc processor */