]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #47893 from kotreshhr/ceph-mgr-finisher-block
authorYuri Weinstein <yweinste@redhat.com>
Thu, 6 Apr 2023 16:23:24 +0000 (09:23 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Apr 2023 16:23:24 +0000 (09:23 -0700)
mgr: Add one finisher thread per module

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
1  2 
src/mgr/ActivePyModules.cc
src/mgr/PyModuleRegistry.h

Simple merge
index 14b8339665a4276e4693bf344b4ea3236b8f3171,c0e951ed7b67ab6053c235b472453634a5c18ae5..e16b2830d910e8cbcf757a1bf443b7a6e49c090b
@@@ -221,9 -219,23 +221,19 @@@ public
  
    auto get_clients() const
    {
 -    std::scoped_lock l(lock);
 -    std::vector<entity_addrvec_t> v;
 -    for (const auto& p : clients) {
 -      v.push_back(p.second);
 -    }
 -    return v;
 +    std::lock_guard l(lock);
 +    return clients;
    }
  
+   bool is_module_active(const std::string &name) {
+     ceph_assert(active_modules);
+     return active_modules->module_exists(name);
+   }
+   auto& get_active_module_finisher(const std::string &name) {
+     ceph_assert(active_modules);
+     return active_modules->get_module_finisher(name);
+   }
    // <<< (end of ActivePyModules cheeky call-throughs)
  };