Skip to content

fix: release healthchecker on 0 nodes#12126

Merged
Revolyssup merged 3 commits into
apache:masterfrom
Revolyssup:revolyssup/releasehealthchecker0node
Apr 11, 2025
Merged

fix: release healthchecker on 0 nodes#12126
Revolyssup merged 3 commits into
apache:masterfrom
Revolyssup:revolyssup/releasehealthchecker0node

Conversation

@Revolyssup

Copy link
Copy Markdown
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
Comment thread apisix/upstream.lua Outdated

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
Copy Markdown
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
Copy Markdown
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

Comment thread t/discovery/reset-healthchecker.t
Comment thread apisix/upstream.lua
@Revolyssup
Revolyssup requested review from nic-6443 and nic-chen April 10, 2025 20:10
@Revolyssup
Revolyssup merged commit a6c7f47 into apache:master Apr 11, 2025
@Revolyssup
Revolyssup deleted the revolyssup/releasehealthchecker0node branch April 11, 2025 04:12
laz-xyr pushed a commit to laz-xyr/apisix that referenced this pull request Jun 19, 2025
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