Repository navigation
Description
Found while fixing #6301 (PR #6306). The instances are closed; the shape is not.
What #6306 did, and what it did not do
getEdgeProperty(nodeId, neighborIndex, direction, edgeType, property) addresses an edge by its position in the node's neighbour list. That contract holds only while the position identifies the same edge getNeighborIds reports there - and an active DeltaOverlay breaks it: the property columns are aligned with the base CSR's forward edge slots, while getNeighborIds serves the overlay's view of the node (deletions dropped, additions merged in, the whole list re-sorted by Arrays.sort). The n-th neighbour of that list is then not the n-th edge of the column store.
PR #6306 closed this for every caller that exists today, by narrowing hasEdgeProperties():
// GraphAnalyticalView
public boolean hasEdgeProperties() {
return snap != null && snap.edgeColumnStores != null && !snap.edgeColumnStores.isEmpty() && snap.overlay == null;
}getEdgeProperty itself is unchanged. Called directly with an overlay active it still returns a value addressed against the base CSR - a weight belonging to some other edge - with nothing in its signature or behaviour to say so. Verified on 0237e7b: the method body contains no reference to snap.overlay.
So the guarantee currently rests on every caller remembering to ask hasEdgeProperties() (or servesEdgeProperty) first. That is exactly the shape #6301 was: a correct-if-you-know-the-rule API, where breaking the rule produces a plausible wrong number rather than an error. The next caller written against the SPI has no way to discover the rule from the method it is calling.
Why it matters more than the caller count suggests
The failure is silent. A wrong weight produces a wrong shortest path, a wrong MST, a wrong Steiner tree - never an exception, never a log line. #6301 sat undetected long enough to reach four independent call sites, and the two in SQLFunction* were only found because a reviewer went looking on the third pass.
It is also reachable in ordinary operation, not a corner: an overlay is what UpdateMode.SYNCHRONOUS produces on every commit against a built view.
Options
- Return
nullwhen the overlay is active. Honest, and matchesgetMeanEdgesPerConnectedPair, which already answersMULTIPLICITY_UNKNOWNfor exactly this overlay. The catch:nullis also how "this edge has no value for that property" is reported, so a caller still cannot distinguish "unavailable" from "absent" - it would silently default the weight instead of silently reading the wrong one. Better, but not closed. - Make the overlay resolvable.
getNeighborIdsknows which entries came from the base CSR and at what offset; carrying that through would letgetEdgePropertymap a post-overlay position back to its forward slot, and answer exactly for base edges andnullonly for overlay-added ones. This closes the shape rather than the instances, and is the only option that lets a weighted algorithm keep the columnar path while a view is being updated - which is the case the CSR exists for. - Remove the positional form from the SPI and leave
edgeWeightsOf(added in fix(#6295, #6300, #6301, #6302): a weight belongs to its own edge, and the phase a call spends its time in is the one that has to be abortable #6306) as the only way in. It already handles the multi-type merge and theBOTHsplit, and it is the only correct way to usegetEdgePropertytoday. Making the sharp tool private to the SPI's own default method is what stops a fifth hand-rolled copy from appearing.
Option 3 is the smallest change that closes the shape, and 2 is the one worth doing if the columnar path should survive an overlay at all. They compose: 3 now, 2 when someone needs the performance.
Activity
fix(#6315): a capped bulk edge-property rewrite must reach the follow…
perf(#6315): one overlay lookup per slice, and no forced rebuild for …
docs(#6315): say why a missing CSR is not a reason to refuse a slice,…
perf(#6315): count edges, not calls, against the edge-update tracking…
perf(#6315): pin the Dijkstra kernel's snapshot, drop the per-edge ma…
perf(#6315): an update to an edge the fresh base CSR already carries …
perf(#6315): ask the tracking cap after identity, and skip the sort a…
Merge pull request #6788 from ArcadeData/fix/6315-edge-property-overl…
lvca commentedon Aug 27, 2026
Fixed in #6788, merged for 26.9.1.
What was wrong. A Graph Analytical View stores edge properties (such as weights) in columns laid out in the order the graph had when the view was built. When you commit a change to the graph, a view in
SYNCHRONOUSmode absorbs it into a pending-changes overlay rather than rebuilding - and the neighbour list it serves from then on reflects that overlay, while the columns still reflect the original order. Asking for a weight by neighbour position could therefore return the weight of a different edge: delete the first of three edges leaving a vertex and the other two each shift down one slot. The result was a wrong shortest path, a wrong minimum spanning tree or a wrong Steiner tree, with no error to tell you it happened.What changed. Neighbours and their weights are now produced together, by the same walk, so a weight can no longer be paired with the wrong edge. The view also resolves the overlay instead of giving up on it: after a commit it keeps answering from its columns for the edges that were already there, and answers for newly added edges from the values recorded when they were committed. That means weighted graph algorithms keep the fast columnar path while a view is being updated, where before they silently fell back to reading edge records after every single commit.
Where the view genuinely cannot know the answer it now says so and the algorithm reads the edges directly, which is exact:
What you should know. If you have written your own
GraphTraversalProvider, thegetEdgeProperty(...)method is gone andedgeWeightsForSlice(...)replaces it. Nothing else changes for normal use of ArcadeDB: no query, API or configuration change is needed, and results only get more accurate.Two smaller matters found while working on this are tracked separately as #6791 and #6792.
❤️ 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#6315): remove the positional edge-property accessor fr…
fix(ArcadeData#6976,ArcadeData#6791): reject unknown algo direction s…