ChainSafe / ChainSafe/gossamer

Gracefully stop overseer and other subsystems

Open
#3,722 1 comment 0 reactions 0 assignees View on GitHub
A-design S-subsystems-overseer T-enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.