Skip to content
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

Stop, pause, and resume #168

Closed
yanivtal opened this issue Jul 13, 2018 · 5 comments
Closed

Stop, pause, and resume #168

yanivtal opened this issue Jul 13, 2018 · 5 comments

Comments

@yanivtal
Copy link
Contributor

yanivtal commented Jul 13, 2018

Since syncing takes a long time it's a bad DX to have to restart syncing every time you stop the node.

  • Make sure we don't duplicate database operations when restarting the server
  • What happens if parameters changes between invocations?
@yanivtal yanivtal added this to the Open Sourcing milestone Jul 13, 2018
@yanivtal yanivtal added the ready label Jul 16, 2018
@Jannis Jannis removed this from the Open Sourcing milestone Jul 19, 2018
@yanivtal yanivtal removed the ready label Jul 21, 2018
@yanivtal yanivtal changed the title Make sure we don't duplicate database operations when restarting the server Stop, pause, and resume Aug 1, 2018
@yanivtal yanivtal added ready and removed to do labels Aug 6, 2018
@yanivtal
Copy link
Contributor Author

yanivtal commented Aug 6, 2018

Depends on #235

@Jannis Jannis added this to the ETHBerlin milestone Aug 21, 2018
@leoyvens leoyvens assigned timmclean and unassigned leoyvens Aug 27, 2018
@leoyvens
Copy link
Collaborator

Assigning to @timmclean since he's doing #235

@timmclean
Copy link
Contributor

I believe this is mostly covered by the new block ingestion/event streaming design. "Stop" can be accomplished with the kill command, which should be safe due to the use of transactions. "Resume" happens when the node is started again, and it will automatically pick up from the last processed block for each subgraph. Mappings won't be run twice or anything like that.

Changing from testnet to mainnet or vice versa without clearing the DB will, uh, do fun things. Proposed enhancement: detect impossibly large reorgs and panic with an error message informing the user that they switched networks without changing the network name parameter.

@Jannis
Copy link
Contributor

Jannis commented Aug 29, 2018

@timmclean What we have in mind for stop/pause/resume as for them to be possible without restarting the node at all. E.g. you'd send a "pause" or "resume" command to the admin JSON-RPC API and it would pause any further blocks/events/transactions from being processed in a subgraph.

You're right thought that killing the process and starting it again should be similar to stop/pause followed by resume.

What is the testnet to mainnet comment referring to?

@Jannis Jannis removed this from the ETHBerlin milestone Sep 20, 2018
@Jannis
Copy link
Contributor

Jannis commented Sep 20, 2018

We don't this feature right now.

@Jannis Jannis removed the ready label Sep 20, 2018
@Jannis Jannis closed this as completed Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants