Skip to main content

Module path_overlay

Module path_overlay 

Source
Expand description

In-transaction (read-your-own-writes) bidirectional shortest path.

Runs only when a non-empty GraphOverlayDelta is supplied. Like the string-keyed BFS in crate::traversal_overlay, the two frontiers are keyed on the node string rather than the u32 CSR id. That choice is what makes bidirectional search correct across staged edges: a node reachable only via a staged edge has no durable surrogate, so the durable dense bidirectional path — which detects a meeting by comparing u32 ids — cannot represent it. With string keys, a staged-only meeting node is simply a string present in both the forward and backward parent maps; the meeting point is a plain string-set intersection and no synthetic (ephemeral) u32 id is ever minted.

Each forward frontier node expands its OUT edges (durable CSR out via node_to_id, skipping staged tombstones and bitmap-excluded durable targets, unioned with overlay.out_neighbors). Each backward frontier node expands its IN edges symmetrically. Staged edges bypass the frontier bitmap: the transaction’s own writes have no durable surrogate to gate on.