]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: beast frontend closes connections on stop 21271/head
authorCasey Bodley <cbodley@redhat.com>
Sat, 31 Mar 2018 03:31:49 +0000 (23:31 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 7 Sep 2018 17:11:36 +0000 (13:11 -0400)
commit93de3367a7d7019fe46717ede418b415826651da
tree5f95b52a6209157ad11a061f2ac1a7ab592181a0
parent378b01064cdf3b6645cbabcb16ad633bb7c45bd2
rgw: beast frontend closes connections on stop

the strategy for stop relies on the fact that process_request() is
completely synchronous, so that io_context.stop() would still complete
each request and clean up properly

to tolerate an asynchronous process_request(), we instead need to drain
all outstanding work on the io_context so that io_context.run() can
return control natually to all of the worker threads. that would allow
us to suspend our coroutine in the middle of process_request(), and
still guarantee that process_request() will resume and run to completion
before the worker threads exit

each connected socket also counts as outstanding work, and needs to be
closed in order to drain the io_context. each connection now adds itself
to a connection list so that stop() can close its socket

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