From a491710d17232e4801552822396376b97fe409e3 Mon Sep 17 00:00:00 2001 From: Zhang Shaowen Date: Mon, 14 Nov 2016 17:15:47 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_lc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 8c5ec60a143..ddd404e46c9 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 {