Skip to content

fix: release healthchecker on 0 nodes #12126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Revolyssup
Copy link
Contributor

Description

Follow up to this fix: #12118
The healthchecker should also be released when new node count is 0.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Apr 8, 2025
@@ -327,6 +327,9 @@ function _M.set_by_route(route, api_ctx)

local nodes_count = up_conf.nodes and #up_conf.nodes or 0
if nodes_count == 0 then
if up_conf.parent and up_conf.parent.checker then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should check the parent and checker in function release_checker ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sounds right. done

@Revolyssup Revolyssup requested review from nic-chen and nic-6443 April 10, 2025 20:10
@Revolyssup Revolyssup merged commit a6c7f47 into apache:master Apr 11, 2025
41 of 42 checks passed
@Revolyssup Revolyssup deleted the revolyssup/releasehealthchecker0node branch April 11, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants