From: Rishabh Dave Date: Fri, 25 Oct 2024 13:10:59 +0000 (+0530) Subject: Merge pull request #60117 from rishabh-d-dave/mgr-vol-base-init X-Git-Tag: v20.0.0~761 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=64350ee087ee5dc67a697d67d639d6602fba0b9b;p=ceph.git Merge pull request #60117 from rishabh-d-dave/mgr-vol-base-init mgr/vol: better to call base class __init__() at beginning Reviewed-by: Milind Changire Reviewed-by: Venky Shankar --- 64350ee087ee5dc67a697d67d639d6602fba0b9b diff --cc src/pybind/mgr/volumes/fs/async_job.py index 80da091c88b,d8c0d0a3fbc..075fedf20a4 --- a/src/pybind/mgr/volumes/fs/async_job.py +++ b/src/pybind/mgr/volumes/fs/async_job.py @@@ -117,17 -118,12 +118,18 @@@ class AsyncJobs(threading.Thread) def __init__(self, volume_client, name_pfx, nr_concurrent_jobs): threading.Thread.__init__(self, name="{0}.tick".format(name_pfx)) + self.vc = volume_client - # queue of volumes for starting async jobs + # self.q is a deque of names of a volumes for which async jobs needs + # to be started. self.q = deque() # type: deque - # volume => job tracking + + # self.jobs is a dictionary where volume name is the key and value is + # a tuple containing two members: the async job and an instance of + # threading.Thread that performs that job. + # in short, self.jobs = {volname: (async_job, thread instance)}. self.jobs = {} + # lock, cv for kickstarting jobs self.lock = threading.Lock() self.cv = threading.Condition(self.lock)