Skip to content

Conversation

juliangruber
Copy link
Member

@juliangruber juliangruber commented Aug 31, 2024

Closes #3.

This PR implements self healing by buffering current round's measurements on disk.

  • Write tests
  • Write round index to first line of buffer file
  • Handle when the recovered round isn't the right one (wrong index)
  • Append or create the buffer file (see test failure)

@bajtos
Copy link
Member

bajtos commented Sep 2, 2024

I am not opposed to this solution, but I'd like to propose an alternative to consider:

Upsides:

  • The service will not need any persistent volume.
  • We don't have to write & maintain complex code to manage a ringbuffer.

Downsides:

  • When there is an outage of the RPC API, or if the eth_getLogs call takes long time to complete, then spark-evaluat will need a lot of time before it starts & can handle events. (This can be mitigated, though. E.g. the startup does not have to wait until we get all events.)
  • On restart, we have to re-fetch measurements from older round events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Self-healing after spark-evaluate restarts
2 participants