Skip to content

agent: a registry refresh rebuilds every cluster entry as new protos, so the snapshot version memo never reuses them (refresh still ~400 ms p99 at 200m) #1115

Closed

Description

@bpalermo

Follow-up from #1105 (PR #1114). #1114 moves version hashing out of the snapshot-cache mutex and memoizes versions for resources published as the same proto object under the same name; time under the mutex drops from ~190 ms to ~0.5 ms and a no-change rebuild halves. A registry refresh stays expensive (wall clock p50/p99 211–299 / 398–407 ms under a 200m-like quota, vs 291–393 / 400–493 on main) because LoadClustersFromRegistry rebuilds every cluster/endpoint entry as fresh protos even when the registry content did not change, so the memo sees new objects and re-marshals + re-hashes all of them.

Fix direction: reuse the previous entry (same proto pointer) when the registry row is unchanged (compare the source row or a cheap digest), so the memo can skip it. Touches the EDS path #1103 is working in — sequence after that lands. Gate: snapshot_build_bench_test.go registry-refresh case p99 < 200 ms under the 200m-like quota; aether.agent.snapshot.resource_versions{source="memo"} share rises on talos.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions