You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
algo.dijkstra.singleSource is the one weighted procedure that still abandons the CSR on every commit #6791
Follow-up from #6315 (PR #6788), raised in review of it.
#6315 made a Graph Analytical View answer edge properties exactly while a delta overlay is active, so the
weighted procedures that read them through GraphTraversalProvider.edgeWeightsOf - algo.mst, algo.msa, algo.steinerTree, algo.bellmanford, algo.apsp, algo.maxKCut, astar(), bellmanFord() - keep the
columnar path across a commit instead of falling back to the edge records.
algo.dijkstra.singleSource does not. Its CSR path is GraphAlgorithms.dijkstraSingleSource, a kernel that
reads csr.getForwardOffsets()/getForwardNeighbors() and the weight column's typed arrays directly - which
is what makes it worth having, and also what makes it unable to see the overlay. It now refuses outright when
one is active (view.hasActiveOverlay()) and falls all the way back to the OLTP per-edge-record path.
That refusal is not a regression - before #6315 the same thing happened, just for a different reason (the
view reported no edge properties at all while an overlay was active, so the guard above the kernel never let
it in). It is simply the one caller that did not get the improvement, and against a SYNCHRONOUS view - where
an overlay is what every commit produces - it means this procedure reads edge records approximately always.
What it would take
The kernel walks the CSR slices per popped node, so the shape that fits is the same one GraphAnalyticalView.edgeWeightsForSlice already implements: ask the view for the node's neighbours and
their weights rather than indexing the arrays. That costs an allocation per popped node, which is exactly what
the kernel exists to avoid, so it wants measuring rather than assuming - possibly a reusable buffer variant of edgeWeightsForSlice, or keeping the raw path when no overlay is active and using the slice API only when one
is.
Worth noting
The rest of GraphAlgorithms (BFS, PageRank, WCC, label propagation, betweenness, ...) reads the base CSR
arrays the same way and is overlay-blind for topology, not merely for weights. That is a wider and older
question than this one and should not be folded into it, but anyone picking this up will meet it immediately.
algo.dijkstra.singleSource was the last weighted procedure that gave up on the fast columnar path whenever the Graph Analytical View had uncommitted-to-the-view changes pending. With a SYNCHRONOUS view that is the state after every single commit, so in practice the procedure was almost always falling back to reading edge records one by one - much slower, on exactly the graphs where the view was supposed to help.
It now keeps using the fast path and resolves those pending changes as it goes, the same way algo.mst, algo.steinerTree, astar() and bellmanFord() already did. Results are unchanged; it's a speed fix.
There is one case it still can't answer exactly - when several parallel edges join the same pair of nodes and only some of them were deleted. There it falls back to reading the edge records rather than guessing, so you always get the correct answer.
No action needed on your side.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
Merge pull request #7001 from ArcadeData/fix/6976-6791-direction-and-…
lvca commentedon Sep 2, 2026
Fixed in #7001.
algo.dijkstra.singleSourcewas the last weighted procedure that gave up on the fast columnar path whenever the Graph Analytical View had uncommitted-to-the-view changes pending. With aSYNCHRONOUSview that is the state after every single commit, so in practice the procedure was almost always falling back to reading edge records one by one - much slower, on exactly the graphs where the view was supposed to help.It now keeps using the fast path and resolves those pending changes as it goes, the same way
algo.mst,algo.steinerTree,astar()andbellmanFord()already did. Results are unchanged; it's a speed fix.There is one case it still can't answer exactly - when several parallel edges join the same pair of nodes and only some of them were deleted. There it falls back to reading the edge records rather than guessing, so you always get the correct answer.
No action needed on your side.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(ArcadeData#6976,ArcadeData#6791): reject unknown algo direction s…
test: consolidate the Issue*Test classes of the other openCypher sub-…
test: consolidate the Issue*Test classes of the other openCypher sub-…