Skip to content

A pushed document's signatures are found through the evidence's own document column - #45

Merged
gedaiu merged 1 commit into
re-devfrom
fix/signature-scan-1471
Nov 1, 2026
Merged

gedaiu merged 1 commit into
re-devfrom
fix/signature-scan-1471

Conversation

@gedaiu

@gedaiu gedaiu commented Nov 1, 2026

Copy link
Copy Markdown

signature_keys_of_document (phrase_bindings.rs, deeplethe#1242) reached the document through chunks, and fact_evidence.chunk_id has no index, so every extracted pushed document seq-scanned all of fact_evidence: 12 s a document on our 8.3 M rows, 28 to 30 copies at once, utopia-db at its CPU limit for as long as a backfill lasts, and every search waiting behind them. fact_evidence.document_id is indexed (fact_evidence_document_idx) and always equals the chunk's document (0 of 8,289,533 rows differ), so the subquery now reads it: same rows, 0.16 s. One query, no schema change.

Tests: phrase_alignment::declared_tests (11) pass against a fresh database.

Fork first; upstream issue deeplethe#1471 carries the plans.

🤖 Generated with Claude Code

…ocument column

`signature_keys_of_document` reached the document through `chunks`,
and `fact_evidence.chunk_id` has no index, so every extracted pushed
document scanned all of `fact_evidence`: 12 s a document on 8.3 M rows,
28 to 30 copies at once, the database at its CPU limit for the length
of a backfill. `fact_evidence.document_id` is indexed and equals the
chunk's document, so reading it gives the same rows in 0.16 s.

Refs deeplethe#1471.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gedaiu
gedaiu merged commit 4cd5ac7 into re-dev Nov 1, 2026
6 checks passed
@gedaiu
gedaiu deleted the fix/signature-scan-1471 branch November 1, 2026 13:58
gedaiu added a commit to re-cinq/lore that referenced this pull request Nov 1, 2026
…job per base (#4062)

Bumps the Utopia pin to `0.1.0-re.27` (digest `sha256:55321d80…`), the
re-dev head after two fork merges:

- re-cinq/utopia#45: `signature_keys_of_document` reaches
`fact_evidence` by its own `document_id` column (indexed) instead of
through `chunks`, which seq-scanned all 8.3M evidence rows per extracted
document (12 s each, 28 to 30 at once). Measured 0.16 s with the index.
Upstream: deeplethe/utopia#1471.
- re-cinq/utopia#46: one `embed_names` job per base. A per-document
enqueue now counts a running copy as queued, so 14 parallel 1 to 3 h
backfills over the same 48k identity names no longer pile up. Upstream:
deeplethe/utopia#1472.

No new migration. The terraform apply is Bogdan's, from main.

Related: #4025, #4057.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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