Skip to content

perf(store): retain recent tree snapshots for read acquisition - #2861

Open
Mirko-von-Leipzig wants to merge 2 commits into
mirko/store-read-apifrom
mirko/store-snapshot-retention
Open

Mirko-von-Leipzig wants to merge 2 commits into
mirko/store-read-apifrom
mirko/store-snapshot-retention

Conversation

@Mirko-von-Leipzig

Copy link
Copy Markdown
Collaborator

Retains four recent tree generations in RecentSnapshots. Readers look up the generation matching their SQLite transaction’s tip, so they can acquire a consistent view even after newer trees have been published. Acquired snapshots remain valid after cache eviction.

This implements the snapshot-retention follow-up proposed in #2859 and reduces retries when the writer advances during read acquisition. The current write order still requires waiting when SQLite is ahead of tree publication. Retained generations keep tree caches and metadata alive and conservatively delay SQL history pruning; the capacity is fixed at four, including the latest generation.

Changelog

[[entry]]
scope       = "rpc"
impact      = "changed"
description = "Reduce read acquisition retries by retaining four recent tree snapshots."

This branch has not been deployed

No deployments
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