mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
Three follow-ups to the staged-writes primitives, all caught by the "are we missing tests?" review: (1) Path A row-ID threading (Gap 1, real bug): stage_append now takes prior_stages: &[StagedWrite] and offsets the assigned row IDs by the sum of prior stages' physical_rows. Without this, two stage_appends against the same dataset both started at ds.manifest.next_row_id, producing fragments with overlapping _rowid ranges. This would have fired in Step 2+ on any multi-statement mutation like `insert Knows ...; insert Knows ...` (multiple appends to the same edge table — allowed under D₂′). The slice mirrors scan_with_staged's API shape; the same slice is passed to both stage and scan. Documented contract: only stage_append results in prior_stages (D₂′ guarantees this upstream). (2) commit_staged round-trip tests (Gap 2): Two tests covering stage_append + commit_staged and stage_merge_insert + commit_staged. Validate that Lance's commit-time row-ID assignment works correctly even after our pre-commit row_id_meta assignment in the append path — the two assignments diverge but neither is observed across the boundary. (3) Filter pushdown test (Gap 3): scan_with_staged with a SQL filter applies it across both committed and staged fragments. Validates the MR-794 ticket's claim that Lance's with_fragments preserves filter/vector/FTS pushdown (Lance tests test_scalar_index_respects_fragment_list etc.). Also adds chained_stage_appends_have_distinct_row_ids which directly demonstrates the Gap 1 fix by projecting _rowid and asserting no duplicates across 1 committed + 2 staged rows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| omnigraph | ||
| omnigraph-cli | ||
| omnigraph-compiler | ||
| omnigraph-server | ||