Skip to content

.why: no KG deep copy, indexed subgoal proofs, release storage guard #134

Closed

Description

@jsam

execute_and_get_context clones all input tuples per call (storage_engine/mod.rs:769). Backward chaining proves each subgoal by linear scan (backward_chaining.rs:498, unification.rs:72). why_query holds the storage read guard throughout. Pass Arc maps, build per-(relation, bound columns) indexes once per call, and drop the guard after taking the snapshot. The gateway runs .why for every finding on every turn, so this is on the hot path.

Roadmap checkpoint — 2026-10-03

S06 (#166) owns the immediate recursive-read deadlock in R1. R04 here still owns snapshot/Arc relation reuse, indexed bound-subgoal proof construction and releasing storage before expensive proof work. Verify tuple equality before/after, concurrent writes, large result paging and gateway changed-finding proof cost; pass #163. S06 alone does not complete this issue.

Activity

  1. added this to the Ops & resources milestone on Oct 3, 2026
  2. added
    backendBackend/server related
    P1Required next for reliable reactive delivery and operations
    on Oct 3, 2026
  3. jsam commented on Oct 4, 2026

    @jsam
    ContributorAuthor

    Delivered by #212 and #215 (proofs from the snapshot with bound-column indexes, no deep copy); verified on main 4adce1e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Required next for reliable reactive delivery and operationsbackendBackend/server related

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions