]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/asio: Add asserts to ensure asio isn't running during `run` and 55219/head
authorSamarah <samarah.uriarte@ibm.com>
Wed, 17 Jan 2024 16:05:02 +0000 (16:05 +0000)
committerSamarah <samarah.uriarte@ibm.com>
Wed, 17 Jan 2024 16:05:02 +0000 (16:05 +0000)
`stop` calls

Signed-off-by: Samarah <samarah.uriarte@ibm.com>
src/rgw/rgw_asio_frontend.cc

index 1e443a84f90da73d3defc6f142d83b18284c0df8..cdc7f840da7c1a0b63df853ede7aea15b20983d0 100644 (file)
@@ -1069,6 +1069,8 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
 
 int AsioFrontend::run()
 {
+  ceph_assert(!is_asio_thread);
+
   auto cct = ctx();
   const int thread_count = cct->_conf->rgw_thread_pool_size;
   threads.reserve(thread_count);
@@ -1093,6 +1095,8 @@ int AsioFrontend::run()
 
 void AsioFrontend::stop()
 {
+  ceph_assert(!is_asio_thread);
+
   ldout(ctx(), 4) << "frontend initiating shutdown..." << dendl;
 
   going_down = true;