fix: confirm NotFound against the API server before dropping status writes#9566
Open
zhaohuabing wants to merge 2 commits into
Open
fix: confirm NotFound against the API server before dropping status writes#9566zhaohuabing wants to merge 2 commits into
zhaohuabing wants to merge 2 commits into
Conversation
…rites Under high watch-event churn the status updater's cache-backed Get can return NotFound for a freshly-created object that the informer cache has not caught up to yet. apply() then silently skipped the write (and even counted it as a success), so the object was left with an empty status until a controller restart rebuilt the cache from a fresh LIST. Confirm the NotFound against an uncached APIReader before giving up. The extra uncached read only happens on a cache miss, so it adds no meaningful API-server load in steady state. Addresses envoyproxy#9536 Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9566 +/- ##
=======================================
Coverage 75.59% 75.60%
=======================================
Files 252 252
Lines 41747 41751 +4
=======================================
+ Hits 31559 31564 +5
+ Misses 8061 8060 -1
Partials 2127 2127 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Addresses envoyproxy#9536 Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
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
Fixes #9536: under high watch-event churn (e.g. ~300+ HTTPRoutes on a single Gateway with ArgoCD auto-sync), some objects end up with an empty
status({"parents":[]}) forever, even though the data plane is programmed correctly. A controller restart flushes all of them at once.Root cause
The status updater's
apply()reads the object with the manager's cache-backed client before writing:Under churn the informer cache lags behind the API server, so this
Getcan returnNotFoundfor a freshly-created object the cache hasn't caught up to yet.apply()then silently returns, so the status is never written.Fix
When the cache-backed
GetreturnsNotFound, confirm against an uncachedAPIReader(mgr.GetAPIReader()) before giving up. If the object is genuinely gone, skip as before; otherwise proceed with the fresh object and write the status.The extra uncached read happens only on a cache miss — never for stable, already-cached objects — so it is bounded by create/delete churn rather than the status-event rate and adds no meaningful API-server load in steady state.