omnigraph/crates
Ragnor Comerford 85a3562957 feat(engine): compact the internal __manifest/_graph_commits tables in optimize
`optimize` iterated node/edge catalog tables only, so the two internal system
tables (`__manifest`, `_graph_commits`) accumulated one fragment per commit and
were never compacted -- making every write's metadata scan O(fragments), which
grows forever on a long-lived graph (RFC-013 step 2).

`optimize_all_tables` now also compacts both internal tables via a new
`compact_internal_table`. They are not catalog-tracked (readers open them at
their latest Lance HEAD), so it is a much simpler path than `optimize_one_table`:
compact in place, no manifest publish (nothing to publish to), no recovery
sidecar (a single atomic Lance commit -- no HEAD-before-publish gap), and no
optimize_indices (they carry no Lance index, only object_id's unenforced-PK
metadata). No application lock: Lance's compact_files auto-retries its Rewrite
against any concurrent writer (the canonical LanceDB pattern; Rewrite vs Append
is compatible, vs Update a retryable same-fragment conflict Lance rebases), and a
coordinator refresh afterwards makes the warm handle observe the compacted HEAD.

Compacts both tables even though Phase 7 (iss-991) will later fold _graph_commits
into __manifest -- a one-call throwaway for the full interim win; __manifest
compaction is also the prerequisite for Phase 7's graph_head contention. Cleanup
(version GC) of the internal tables is deliberately NOT included here: it needs
the Q8 cleanup-resurrection watermark first (deferred).

maintenance.rs: optimize now returns 6 stats (4 data + 2 internal); adds
optimize_compacts_internal_tables (sheds fragments, leaks no recovery sidecar,
graph coherent for reads + strict writes after).
2026-06-20 17:28:52 +02:00
..
omnigraph feat(engine): compact the internal __manifest/_graph_commits tables in optimize 2026-06-20 17:28:52 +02:00
omnigraph-api-types release: v0.7.1 (#290) 2026-06-19 23:12:44 +03:00
omnigraph-cli release: v0.7.1 (#290) 2026-06-19 23:12:44 +03:00
omnigraph-cluster release: v0.7.1 (#290) 2026-06-19 23:12:44 +03:00
omnigraph-compiler release: v0.7.1 (#290) 2026-06-19 23:12:44 +03:00
omnigraph-policy release: v0.7.1 (#290) 2026-06-19 23:12:44 +03:00
omnigraph-server release: v0.7.1 (#290) 2026-06-19 23:12:44 +03:00