Skip to content

Graph Analytical View: a lightweight edge created or removed after the build never reaches the view (SYNCHRONOUS overlay, and staleness of OFF/ASYNC) #9572

Closed

Description

@lvca

A Graph Analytical View in UPDATE MODE SYNCHRONOUS does not see a lightweight edge created after the view was built: the overlay never receives it, so every query served by the view (count push-downs and the row pipeline alike) answers as if the edge did not exist. Dropping the view gives the right answer.

Found while working on #9283.

Repro:

CREATE VERTEX TYPE P; CREATE EDGE TYPE K;
-- a -K-> b (record edge)
CREATE GRAPH ANALYTICAL VIEW v1 VERTEX TYPES (P) EDGE TYPES (K) UPDATE MODE SYNCHRONOUS
-- in a new transaction, with c a new P: a.newLightEdge("K", c); a.newEdge("K", c)
MATCH (a:P)-[:K]->(b:P) RETURN count(*)                  -- 2, expected 3
MATCH (a:P)-[:K]->(b:P) WITH * RETURN count(*)           -- 2, expected 3
-- then a.newLightEdge("K", a) in another transaction
MATCH (a:P)-[:K]->(b:P) RETURN count(*)                  -- 2, expected 4
DROP GRAPH ANALYTICAL VIEW v1
MATCH (a:P)-[:K]->(b:P) RETURN count(*)                  -- 4

Cause: DeltaCollector learns about changes through the record listeners (onAfterCreate / onAfterDelete), and a lightweight edge has no record, so neither its creation nor its removal is ever reported. The same listener decides whether an OFF or ASYNCHRONOUS view goes stale, so a transaction that only touches light edges presumably leaves those views fresh too (to be verified).

The fix has to hook the light-edge writes themselves (the edge-list append / removal in GraphEngine), for creation and deletion, and cover the staleness detection of the other two modes.

Activity

  1. added this to the 26.11.1 milestone on Oct 9, 2026
  2. added
    engine
    on Oct 9, 2026
  3. added
    severity:major
    on Oct 9, 2026
  4. added
    in progress
    on Oct 10, 2026
  5. self-assigned this
    on Oct 10, 2026
  6. added 6 commits that reference this issue on Oct 10, 2026
  7. lvca commented on Oct 10, 2026

    @lvca
    MemberAuthor

    Fixed by #9610 (release 26.11.1).

    A Graph Analytical View missed two kinds of edge writes, so it kept answering with the old graph until its next full rebuild:

    • Lightweight edges: creating one did not reach the view (deleting one already did). The view now picks up both, and counts duplicate lightweight edges between the same two vertices correctly.
    • GraphBatch bulk loads: they bypass the per-record events views listen to, so none of the loaded edges reached the view. Now, when a batch closes, a SYNCHRONOUS view rebuilds right away, and an ASYNCHRONOUS one schedules a rebuild as for any other commit.

    No change 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.

  8. removed
    in progress
    on Oct 10, 2026
  9. lvca commented on Oct 10, 2026

    @lvca
    MemberAuthor

    The lightweight-edge fix landed in #9610. #9684 (26.11.1) also fixes two related cases where a SYNCHRONOUS Graph Analytical View kept an edge the graph no longer had:

    • moving an edge (UPDATE ... SET @in = ... / @out) left the old edge in the view. The move now reports the old edge as deleted, so an AFTER DELETE trigger on the edge type also fires on a move;
    • deleting a vertex that was added after the view was built left its edges counted on its neighbours.

    ❤️ 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.

  10. added a commit that references this issue on Oct 11, 2026
  11. added 7 commits that reference this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugengineopencypherseverity:major

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions