You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each node service (consensus, RPC server, notary service, etc.) we need to ensure that:
Double-call to Start doesn't hurt service. Usually it can be done via checking isStarted atomic variable.
Double-call to Shutdown doesn't hurt the service. Usually it can be done via checking isStarted and isFinished atomic variables.
Service is waiting until all its processes are finished before it returns from Shutdown. Usually it can be done via using two channels: shutdownchannel is used to send a signal to the main service loop to start shutdown process and quit channel is used inside the Shutdown method to wait until main service loop is finished and closes quit.
Not all services follow these rules which can cause problems with #1949 and long-term node functionality support.
The text was updated successfully, but these errors were encountered:
AnnaShaleva
changed the title
Review and refactor services shutdown process
Review and refactor services start and shutdown processes
Jun 28, 2022
For each node service (consensus, RPC server, notary service, etc.) we need to ensure that:
Start
doesn't hurt service. Usually it can be done via checkingisStarted
atomic variable.Shutdown
doesn't hurt the service. Usually it can be done via checkingisStarted
andisFinished
atomic variables.Shutdown
. Usually it can be done via using two channels:shutdown
channel is used to send a signal to the main service loop to start shutdown process andquit
channel is used inside theShutdown
method to wait until main service loop is finished and closesquit
.Not all services follow these rules which can cause problems with #1949 and long-term node functionality support.
The text was updated successfully, but these errors were encountered: