From: Zhang Shaowen Date: Mon, 14 Nov 2016 09:15:47 +0000 (+0800) Subject: rgw: Fix a bug that LCWorker's worktime is not the same as config X-Git-Tag: v12.0.2~203^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a491710d17232e4801552822396376b97fe409e3;p=ceph.git rgw: Fix a bug that LCWorker's worktime is not the same as config rgw_lifecycle_work_time. Fixes: http://tracker.ceph.com/issues/18087 Signed-off-by: Zhang Shaowen --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 8c5ec60a143d..ddd404e46c9c 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -529,7 +529,7 @@ bool RGWLC::LCWorker::should_work(utime_t& now) if (cct->_conf->rgw_lc_debug_interval > 0) { /* We're debugging, so say we can run */ return true; - } else if ((bdt.tm_hour*60 + bdt.tm_min >= start_hour*60 + start_minute) || + } else if ((bdt.tm_hour*60 + bdt.tm_min >= start_hour*60 + start_minute) && (bdt.tm_hour*60 + bdt.tm_min <= end_hour*60 + end_minute)) { return true; } else {