Repository navigation
Conversation
An edge-table relation can take its time and weight from the edge table itself. The edge build reads that value at row_idx, the position of the edge row in its shard. When a row's source or destination key was missing from the primary-key map, the edge build dropped the row without advancing row_idx. Every later edge in that shard then read the time and weight of an earlier row. Advance row_idx in the two lookup-miss branches, as the null-time branch already does. The new tests put missing keys before valid rows on 1 shard and on 4 shards, and check the time and weight of every edge in both directions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Change mapObserved failure: an edge-table row can have a missing source or destination key. After it, each later edge in that shard reads an earlier row's time and weight. Existing behavior: the two lookup-miss branches return without advancing
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueNote
|
Design discussion or issue: none. A read-only check of DiskGraph edge sort keys found this bug on 3 December 2026.
Summary
Sometimes an edge-table row has a source or destination key that the node table does not have. After such a row, this PR keeps the time and weight of each later edge in that shard aligned with its own row.
Why
An edge-table relation can take its sort key (time and weight) from the edge table itself. Ingest then reads the value of each edge at
row_idx, the position of the edge row in its shard. The edge build drops a row whose source or destination key is missing from the primary-key map. In that case it returned without advancingrow_idx. Every later edge in that shard then read the time and weight of an earlier row. In the check runs, 3 of 10 edges had the right time after 2 such rows. With 4 such keys over 4 shards, 22 of 40 edges had the right time. Other shards are not affected.Before and now
row_idxadvancesrow_idxdoes not advancerow_idxadvancesrow_idxdoes not advancerow_idxadvancesWhy the new way is better
Trade-off
Change map
See the change-map comment on this PR.
Testing Done
ingest_sort_key_alignment.rs:sort_key_alignment_edge_table_dangling_keys(1 shard) andsort_key_alignment_edge_table_dangling_keys_across_shards(4 shards). They check the time and weight of every edge in both directions, and the lookup-failure counts. Both fail on main and pass with the fix.cargo test --locked --workspaceinpackages/diskgraph: 2,204 passed, 18 ignored and 1 failed. The failure isdisk_manager::tests::test_eviction_under_real_disk_pressure, which measures free space on a shared disk and fails the same way on main on the test machine.cargo clippy --locked --workspace --all-targets --exclude diskgraph-ptrhash -- -D warnings: clean.diskgraph-ptrhashfails the same way on main on aarch64, in an unchanged test file.kumoapimodule, the same as on main.Hotfix Context
Not a hotfix.
Checklist
🤖 Generated with Claude Code