membphis commented on PR #13629: URL: https://github.com/apache/apisix/pull/13629#issuecomment-4852144600
This still leaves the health-filter bypass window on node-only updates. The PR keeps the old checker alive and reconciles targets in `timer_create_checker`, but `fetch_checker()` still returns a checker only when `working_item.version == resource_ver`. When a discovery/DNS change bumps `_nodes_ver`, `upstream.lua` asks for the new version, `fetch_checker()` enqueues that version and returns `nil` until the 1s timer runs. During that window `api_ctx.up_checker` is `nil`; the balancer treats a nil checker as all upstream nodes being available. So a previously unhealthy node can still receive traffic immediately after a node-only update, even though the checker state was not destroyed. Trigger: 1. Existing checker marks node A unhealthy. 2. Service discovery/DNS adds or removes another node without changing `checks`. 3. The first request after `_nodes_ver` changes calls `fetch_checker()` with the new version. 4. `fetch_checker()` returns `nil` before `timer_create_checker` reconciles and publishes the old checker under the new version. 5. The balancer builds the picker from all upstream nodes, including node A. This blocks the fix for #13282 because the health state is preserved internally but is not used by requests during the version transition. Please let `fetch_checker()` return the existing live checker for the same resource when the latest config is reuse-eligible (`checks` unchanged and nodes non-empty), while still enqueueing the new version for target reconciliation. A regression test should make one node unhealthy, apply a node-only update, and assert that requests before the timer reconcile do not hit the unhealthy node. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
