moonming opened a new pull request, #14261:
URL: https://github.com/apache/apisix/pull/14261

   ### Description
   
   Follow-up to #14218.
   
   When a shared-memory target-list replacement fails with `no memory`, 
OpenResty may already have deleted the previous value. Reconstructing the list 
then takes the target-not-found path in `lua-resty-healthcheck`. Passing a 
literal `true` as the initial health state overwrites a previously unhealthy 
target and temporarily makes it eligible for traffic.
   
   Use the checker's known target status for both target-addition paths, 
defaulting to healthy only for a genuinely unknown target. Extend the existing 
real-service retry regression with deletion-faithful failures for both addition 
and removal. The new addition case verifies the shared status, worker status, 
and 40/40 healthy upstream responses; before this fix it reported the target as 
healthy and only 20/40 requests succeeded.
   
   This is an internal reliability fix with no public API or configuration 
change, so no documentation update is required.
   
   #### Which issue(s) this PR fixes:
   
   No separate issue; this is a regression test and reliability follow-up to 
#14218.
   
   ### Validation
   
   - `t/node/healthcheck-initial-target-retry.t`: 30/30 assertions pass with 
the APISIX master's healthcheck 3.2.5 runtime.
   - The new deletion-faithful addition case fails before the caller fix: 
shared state becomes healthy and only 20/40 requests succeed.
   - `git diff --check` and LuaJIT syntax compilation pass.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change (not needed 
for this internal reliability fix)
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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]

Reply via email to