You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(xds): cache the mTLS-injected cluster per entry (drop per-snapshot proto.Clone) #537
None of these inputs change per snapshot — they change when the entry is (re)built, when sanNamespaces change, or when the netns→ID map changes. This is O(clusters) proto deep-copies on every push, on every node, constantly during churn.
Fix: precompute the injected cluster (or at minimum the transport socket + sanURIs + waypointSNI) at entry build/invalidation time and store it on clusterEntry; the snapshot path just reads it. Invalidate on the events that actually change the inputs (endpoint namespace set, netns map, node SVID).
Do NOT touch: snapshotMu scope (deliberately serializes version+read+SetSnapshot, see snapshot.go:34-38) and the unified full-snapshot model (partial per-type snapshots clobber other types — the #70-#75 bug class). Same pattern applies to the duplicate sprintf in capture.go:262-265 (captureTCPClusters).
Validation: existing tests + agent.snapshot.generate duration metric should visibly drop.
Activity