ChainSafe / ChainSafe/gossamer
Gracefully stop overseer and other subsystems
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Issue summary
- Overseer and all other subsystems are connected through channels.
- Overseer and all other subsystems only make sense together. If any other subsystem is stopped, it doesn't make sense for others to keep running.
- We want to make sure that when we close the channels for communications between overseer and subsytems, we don't create a `panic`
I think the step would most likely be following.
- All subsystems stop sending new request to overseer.
- All the subsystems are still running. They will receive requests that were sent before above shutdown. They will process all existing requests.
- It they can process the request and respond to it in the response channel provided inside the request.
- If a subsystems need to make a request to some other subsystem to process its current request, it should realize that we have stopped sending requests and that request would fail with an error.
- We would think about each requests separately about how important they are, if we need to note them down to process them later
## Other information and links
- We found the problem because of this PR https://github.com/ChainSafe/gossamer/pull/3707 and test failure in `TestHandleBlockEvents`
Contributor guide
Assessment
This issue has not been assessed yet.