Skip to content

fix(storage): fix large-block index truncation and multibyte title panic#10

Merged
harehare merged 4 commits into
mainfrom
feat/landing-page-and-query-perf
Jul 5, 2026
Merged

fix(storage): fix large-block index truncation and multibyte title panic#10
harehare merged 4 commits into
mainfrom
feat/landing-page-and-query-perf

Conversation

@harehare

@harehare harehare commented Jul 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

harehare added 4 commits July 5, 2026 18:19
Index by_content/by_lang entries used a u16 length prefix, silently
truncating/wrapping for any block over 64KB. tui.rs's document-list title
truncation sliced by byte offset, which panics on multibyte titles whose
truncation point lands mid-character. Bumps the on-disk format version
since the index byte layout changed.
Adds a hash-join fast path for equi-join ON clauses (documents JOIN
blocks ON b.document_id = d.id), avoiding the full left*right cross
product the SQL engine previously always materialised — a join over an
80k-document/600k-block store dropped from ~112s to ~3s. Falls back to
the existing cross-join for non-equality joins.

Also speeds up `mq-db index` on large file sets: the page-file header
was rewritten (seek to page 0 + write) on every single page append;
it's now deferred to one write per store save. Reading files for a
fresh index now happens across a worker-thread pool first, since
reading thousands of small files is I/O-latency bound, not CPU bound.
Indexing 80k files dropped from ~18s to ~7s.
Adds docs/index.html (a single-page site covering the pipeline, the
interval-index pitch, SQL/join examples, features, and install
instructions) plus a workflow to deploy docs/ on change. Syncs README's
mermaid diagram theming and license badge color to match.
@harehare harehare merged commit 8a9e831 into main Jul 5, 2026
8 checks passed
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