mirror of
https://github.com/ceph/ceph
synced 2024-12-17 08:57:28 +00:00
Merge pull request #10480 from ceph/lifecycle-cleanup
Clean up lifecycle thread Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
e3ba5e8543
@ -474,6 +474,7 @@ void RGWLC::start_processor()
|
||||
|
||||
void RGWLC::stop_processor()
|
||||
{
|
||||
down_flag.set(1);
|
||||
if (worker) {
|
||||
worker->stop();
|
||||
worker->join();
|
||||
@ -490,7 +491,7 @@ void RGWLC::LCWorker::stop()
|
||||
|
||||
bool RGWLC::going_down()
|
||||
{
|
||||
return false;
|
||||
return (down_flag.read() != 0);
|
||||
}
|
||||
|
||||
bool RGWLC::LCWorker::should_work(utime_t& now)
|
||||
|
@ -179,6 +179,7 @@ class RGWLC {
|
||||
RGWRados *store;
|
||||
int max_objs;
|
||||
string *obj_names;
|
||||
atomic_t down_flag;
|
||||
|
||||
class LCWorker : public Thread {
|
||||
CephContext *cct;
|
||||
|
@ -3176,6 +3176,12 @@ void RGWRados::finalize()
|
||||
delete gc;
|
||||
gc = NULL;
|
||||
|
||||
if (use_lc_thread) {
|
||||
lc->stop_processor();
|
||||
}
|
||||
delete lc;
|
||||
lc = NULL;
|
||||
|
||||
delete obj_expirer;
|
||||
obj_expirer = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user