fix: stop leaking cached envoy snapshots - #11309
Open
chandler-solo wants to merge 12 commits into
Open
Conversation
For #7086 Signed-off-by: David L. Chandler <david.chandler@solo.io>
4 tasks
|
Visit the preview URL for this PR (updated for commit 6e54c42): https://gloo-edge--pr11309-chandler-clearsnapsh-7llijtwk.web.app (expires Tue, 11 Aug 2026 22:24:01 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 77c2b86e287749579b7ff9cadb81e099042ef677 |
…atus GC Rework the snapshot eviction and stale-route-status GC on this branch based on review findings. xds eviction: - Register eviction on uniqueClients delete events (the refcounted "last stream gone" signal) instead of perclientSnapCollection deletes, which also fire transiently for still-connected clients when snapshotPerClient returns nil (translation blips, the defer-building-snapshot hack). Clearing on those would withdraw a live envoy's last coherent config and force-close its watches, resetting healthy ADS streams with codes.Unavailable. - Guard ClearSnapshot with GetStatusInfo instead of GetSnapshot: the status entry is what ClearSnapshot nil-derefs when absent (control plane panic), and the GetSnapshot probe deep-cloned the entire snapshot just to test existence. route status GC: - Skip (and keep tracking) routes that still reference a live Gateway of a managed class: absence from the report is then likely a transient translation failure, and stripping status would wipe valid Accepted/ResolvedRefs conditions off attached, serving routes. - Read through mgr.GetAPIReader() so conflict retries actually see a fresh resourceVersion and a lagging informer cache can never hide our own just-written status (which would drop the route from tracking with its stale status left behind). - Collapse the three per-kind tracking fields and mutex into one kind-keyed map driven by a table. The GC only runs on the single status-sync goroutine, and a mutex alone would not make concurrent use safe anyway - correctness also depends on report ordering. - Simplify removeControllerRouteStatus with slices.DeleteFunc. Add a regression test covering the still-referenced-gateway guard. Signed-off-by: David L. Chandler <david.chandler@solo.io>
|
Issues linked to changelog: |
4 tasks
added 8 commits
July 31, 2026 18:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stop leaking cached envoy snapshots.
For #7086
API changes
Code changes
CI changes
Docs changes
Context
Interesting decisions
Testing steps
Notes for reviewers
Checklist:
BOT NOTES:
resolves https://github.com/solo-io/solo-projects/issues/7086