]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: set duration for lifecycle lease 12231/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 30 Nov 2016 00:44:29 +0000 (16:44 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 30 Nov 2016 00:44:29 +0000 (16:44 -0800)
Fixes: http://tracker.ceph.com/issues/17965
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_lc.cc

index 772e1e773462343f5dca2746778d90062394ee7a..5b07c5990af8879ee1f7096a65de1591ae576dc2 100644 (file)
@@ -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<string, int >& 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 */