feat(core): add checkpoint-backed materialization catch-up#121
Closed
marcus-pousette wants to merge 11 commits intocybersemics:codex/materialization-frontierfrom
Closed
Conversation
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scan_after) so Postgres and sqlite can replay from a concrete op-key boundary instead of rescanning from the beginningWhy This Is A Separate PR
dirtywith an explicit replay frontierCheckpoint Model
seq = 1)64committed materialization seqsCore Changes
Storagegainedscan_after(...)so adapters can stream ops strictly after a concrete(lamport, replica, counter)boundaryPostgres
treecrdt_checkpointstreecrdt_checkpoint_nodestreecrdt_checkpoint_payloadtreecrdt_checkpoint_oprefs_childrenensure_materialized_in_txnow restores the latest checkpoint before the frontier and replays only the suffix after that checkpoint headscan_after(...)with a SQL key-range scan over(lamport, replica, counter)SQLite
materialization_checkpointscheckpoint_nodescheckpoint_payloadcheckpoint_oprefs_childrentreecrdt_ensure_materialized()now restores the latest checkpoint before the frontier and replays only the suffix after that checkpoint headscan_after(...)with the equivalent SQL key-range scanCases Improved By This PR
Remaining Fallback
Tests
cargo test -p treecrdt-corecargo test -p treecrdt-postgres --test postgres_testcargo test -p treecrdt-sqlite-ext --features ext-sqlite --test extension_roundtrippnpm run clippy