-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snapshot loading cannot be stopped by CTRL-C #798
Comments
What state would you expect the node to be in if interrupted by ctrl-c while loading the snapshot? |
Just delete everything and put up a big warning before quitting. Otherwise the user has to wait for a long time if loading a big snapshot. |
We cannot shutdown in the middle of snapshot loading and leave nodeos in a good state. And we do not want Ctrl-C to leave nodeos in a bad state; there is already So the most we can do for this issue is to change the log message reported in reaction to Ctrl-C. Right now it prints the message "appbase quit called". One simple thing we can do is to just change this message to the more helpful "Shutdown pending". Another thing we can do in addition to that is to detect the context we are in (in the middle of snapshot loading, for example) and based on that clarify to the user that nodeos will shutdown after, for example, snapshot initialization completes which may take a long time. |
hi! Tell me how to start a node from a snapshot if after starting the node it starts synchronization and it is impossible to terminate the node correctly! the database crashes. I start it like this: |
When syncing you have to be very patient with ctrl-c or SIGTERM/SIGINT to stop a node. When syncing |
I tried to stop loading snapshot by CTRL-C but failed. The loading kept going until finished, and then nodeos exited due to the earlier CTRL-C:
The text was updated successfully, but these errors were encountered: