]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Beacon: wake up the thread in shutdown() 60837/head
authorMax Kellermann <max.kellermann@ionos.com>
Fri, 11 Oct 2024 20:06:42 +0000 (22:06 +0200)
committerVenky Shankar <vshankar@redhat.com>
Tue, 26 Nov 2024 05:17:49 +0000 (10:47 +0530)
This eliminates the `wait_for()` delay and speeds up MDS shutdown.

Fixes: https://tracker.ceph.com/issues/68759
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
(cherry picked from commit 0276ab4eb9dd09b0bd8e39389a75e960390ceaeb)

src/mds/Beacon.cc

index 059b540feb02ebf9519a864bd96480ca582ae7a2..b7e675c3faa595ba044ecd6234a87bb519624bf3 100644 (file)
@@ -60,6 +60,7 @@ void Beacon::shutdown()
   std::unique_lock<std::mutex> lock(mutex);
   if (!finished) {
     finished = true;
+    cvar.notify_all();
     lock.unlock();
     if (sender.joinable())
       sender.join();