Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Write message claims in independent SQLite files - #7658

Draft
Sinity wants to merge 7 commits into
masterfrom
perf/partition-claims
Draft

Sinity wants to merge 7 commits into
masterfrom
perf/partition-claims

Conversation

@Sinity

@Sinity Sinity commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Hash each message ID to one of eight claim databases. The ordinary index writer stages claim changes in its SQLite transaction. Independent file writers prepare a durable generation, and the main index publishes that generation with the parse position and composed rows. Existing SQL predicates still seek indexed claim rows. A failure leaves the previous generation visible, and the next write replaces abandoned work.

The parse layout changes, so opening an older index recomputes its parse and dependent groups. Older published versions in a file can still serve an older pinned main snapshot. The benchmark worker count can vary without changing which file owns a message.

A hosted package build will make the candidate available for paired replay. The local compile passed before the worker-count integration. Focused tests and real replay qualification are pending.

Task: plnext-sjuf.103

Route each claim by its message ID and prepare the files in parallel. Publish their generation together with composed rows and parse positions so a reader keeps a consistent snapshot through an interrupted commit.
Use the same typed engine setting for the number of active writers. Each worker takes a group of the existing files, so comparing one and eight workers changes scheduling without changing storage or queries.
Pin claim files at the start of a read and sync the surviving frontier before cleanup. Keep source provenance indexed and include logical claims when comparing old and new layouts.
Open fixtures through the archive connection and gather planner statistics through each database's writer access. Keep history comparison and daemon startup assertions covering the new layout.
The main writer holds the previous shard snapshots during durable preparation. Copy the logs after releasing those snapshots so the next write can reuse their frames. Record the shard workers' SQLite work and checkpoint progress.
Keep pending row values in a connection-owned buffer and put their lookup keys and slots under SQLite savepoints. Send owned rows to the shard writers without reconstructing them from a temporary table. Route planned message ID lookups only to their owning file.
Preserve the released index schema as snapshot 5 and record the split claim table as snapshot 6.

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