]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: use abort_source in stop_signal
authorKefu Chai <tchaikov@gmail.com>
Sat, 1 Oct 2022 09:43:00 +0000 (17:43 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 1 Oct 2022 09:43:00 +0000 (17:43 +0800)
commit728492c993f8ad94de176dc6dc4407f6f5aa8096
treeda010ad676b5c98db3fbe3b93c3e3d011408f1be
parent815f39295d738bbc6eddd0f8783b245d3caf32e6
crimson/osd: use abort_source in stop_signal

before this change, `stop_signal::wait()` waits until it receives
`SIGTERM` or `SIGINT`, but we also need to stop the service per the
request of monitor or when a serious health condition is detected.

so, an `abort_source` should allow the server to request abort by
itself. also, as the single truth of stop, `stop_signal` will be
able to send the message to its subscribers to abort any "blocking"
calls which might prevent or delay the stop process.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/crimson/osd/stop_signal.h