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

Streaming snapshot checkpoint in Tsavorite #824

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

badrishc
Copy link
Contributor

StreamingSnapshot is a new checkpoint type that yields a stream of (mostly but not all distinct) key-value pairs that correspond to a consistent snapshot (version v) of the database. This can be used to create a checkpoint of the user's preferred format, or directly streamed to replicas, etc. To recover, the user needs to simply iterate over this stream in order, performing a sequence of upserts, and this will restore the consistent v version (state) of the database.

Treating this iterator as a checkpoint allows users to pair it with AOF replay to get exactly once processing semantics (TBD).

Current implementation makes the mutable region temporarily read-only, similar to a snapshot checkpoint. However, this can be optimized to avoid the copy-on-write in future, by making the update threads write out the old version v before updating it to v+1 in place.

@badrishc badrishc marked this pull request as ready for review November 26, 2024 22:09
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

Successfully merging this pull request may close these issues.

1 participant