Skip to content

neighbors: follow-ups from #541 (graph-age clamp, cache/publish tests, atomic.Pointer) #545

Closed

Description

@dborup

Follow-ups from the #541 review (Macmini, APPROVE with nits), none blocking:

  1. F1, config semantics. cacheRecomputeIntervalSeconds is now the only bound on neighbour-graph age, and every tick runs a full build (≈ 1.3 s at 30K tx / 2K nodes). Before perf(neighbors): rebuild graphs outside request and pointer locks #541 the graph was never older than neighborGraphTTL (5 min), whatever the knob was set to. Clamp the graph rebuild to at most once per neighborGraphTTL, or document a minimum and maximum, and keep the response-cache cadence independent. Our instances use the default 300 s, so their behaviour is unchanged today.
  2. F2, test gap. No test pins that the cached response is built from the graph the same tick just produced. Mutant M2, which builds the response before the rebuild, survives go test ./....
  3. F3, test gap. No test pins the pointer-mutex invariant around the graph publish; dropping neighborMu survives -race. Option F7: switch to the house atomic.Pointer pattern (store.graph, neighborGraphCache.ptr), which removes the mutex and makes the mutant unrepresentable.
  4. F4. Restore the #1481 P0-1 / #1483 references in the rewritten config comments.
  5. F6, pre-existing. NeighborMaxEdgeKm() / DebugAffinity wiring is untested.

Relates to #541.

Activity

  1. dborup commented on Oct 24, 2026

    @dborup
    OwnerAuthor

    Fixed by #550 (merged as a4126c63d25182b51596c156ba3a51d0545bd244).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions