]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: beast frontend uses async SharedMutex for pause
authorCasey Bodley <cbodley@redhat.com>
Mon, 19 Mar 2018 20:49:38 +0000 (16:49 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 7 Sep 2018 17:11:36 +0000 (13:11 -0400)
commit378b01064cdf3b6645cbabcb16ad633bb7c45bd2
tree8003546a5ed9906fd45db3c3c16b6b6bbbe36a85
parent539c675db9de1e06f204edac462e17c0b1f7568b
rgw: beast frontend uses async SharedMutex for pause

the strategy for pause relied on stopping the io_context and waiting for
io_context.run() to return control to all of the worker threads. this
relies on the fact that process_request() is completely synchronous (so
considered a single unit of work in the io_context) - otherwise, pause
could complete in the middle of a call to process_request(), and destroy
the RGWRados instance while it's still in use

calling io_context.stop() to pause the worker threads also assumes that
no other work will be scheduled on these threads

to decouple pause from worker threads, handle_connection() now uses an
async shared mutex to synchronize with pause/unpause

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_asio_frontend.cc