]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_context: avoid unnecessary wait during service thread shutdown 31020/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 15 Oct 2019 22:19:15 +0000 (18:19 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 21 Oct 2019 12:59:32 +0000 (14:59 +0200)
Fixes: https://tracker.ceph.com/issues/42332
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit e8249d3b28f8789b2d4aca6fb75c75103a5cbea1)

Conflicts:
src/common/ceph_context.cc
- luminous uses Mutex::Locker instead of std::unique_lock

src/common/ceph_context.cc

index 87194f7dd5370099b4ed8fee4f73e85cec8b820b..cb77bb64ea63c857e285a32c4ee8dd5215fede7b 100644 (file)
@@ -135,6 +135,9 @@ public:
   {
     while (1) {
       Mutex::Locker l(_lock);
+      if (_exit_thread) {
+        break;
+      }
 
       if (_cct->_conf->heartbeat_interval) {
         utime_t interval(_cct->_conf->heartbeat_interval, 0);