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

Merged
merged 20 commits into from
Dec 13, 2024

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 requested a review from TedHartMS November 23, 2024 02:07
@badrishc badrishc marked this pull request as ready for review November 26, 2024 22:09
@vazois vazois self-requested a review December 3, 2024 19:17
@badrishc badrishc merged commit ca02229 into main Dec 13, 2024
20 checks passed
@badrishc badrishc deleted the badrishc/streaming-snapshot-v0 branch December 13, 2024 18:25
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.

3 participants