]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: OpsLogFile::stop() signals under mutex
authorCasey Bodley <cbodley@redhat.com>
Mon, 25 Apr 2022 17:28:02 +0000 (13:28 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 8 Jun 2022 16:21:40 +0000 (12:21 -0400)
this shuts up ceph::debug_condition_variable's assertion that the
associated mutex is held during notify_one(). this is not strictly
required for correct use, but is a common source of bugs

Fixes: https://tracker.ceph.com/issues/55432
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit cf6f99e67a6dbbc4e39d9e1fda32356c18051f5a)

src/rgw/rgw_log.cc

index 5876b1789bff22efa4c769810e7afc4bccd5521c..8d53909eacad92bc5cb67eb8fe5b4384d1332bf4 100644 (file)
@@ -398,6 +398,7 @@ void OpsLogFile::start() {
 
 void OpsLogFile::stop() {
   {
+    std::unique_lock lock(log_mutex);
     cond_flush.notify_one();
     stopped = true;
   }