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

How to recover from snapshot after process restart? #73

Closed
marius-klimantavicius opened this issue Jan 4, 2019 · 1 comment
Closed

Comments

@marius-klimantavicius
Copy link
Contributor

marius-klimantavicius commented Jan 4, 2019

Is it possible to recover FASTER state from snapshots after process restart (crash). All of the examples regarding recovery are for the same process and uses Guid that was returned by TakeFullCheckpoint. Does it mean that this Guid should be stored somewhere (DB for durability) after taking a checkpoint, then during startup it would be read and used for recovery?
What if multiple threads had performed checkpoint - which Guid should be used for recovery?

@badrishc
Copy link
Contributor

badrishc commented Jan 7, 2019

Yes, the point of checkpointing is to be able to recover FASTER after a process failure/crash.

The Checkpoint call returns a Guid that the user is responsible for persisting, e.g., in a local file or database. During recovery, you read the Guid and use it as the parameter to Recover. This allows the reader to create multiple checkpoints and choose which one to recover to. One may also take separate checkpoints of the index and hybrid log, and combine these checkpoints to control recovery time.

If multiple threads were interacting with FASTER, each thread should persist its session ID (obtained during StartSession). During recovery, each thread registers with FASTER using its session ID, using ContinueSession. This call will return the operation sequence number from which the thread should continue feeding input operations after recovery.

You can take a look at the SumStore example for more details. This example allows you to recover after a crash. Adding @gunaprsd as well (feel free to chime in with more details or corrections).

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

No branches or pull requests

2 participants