Skip to content
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

bugfix: create the health checker in access phase, allow to call `y… #1971

Closed
wants to merge 5 commits into from
Closed

bugfix: create the health checker in access phase, allow to call `y… #1971

wants to merge 5 commits into from

Conversation

membphis
Copy link
Member

@membphis membphis commented Aug 3, 2020

…ield` function,

the healchecheck need this when creating new object.

What this PR does / why we need it:

as title.

In balancer phase, it not support yield, then we can not call resty.lock, here the source link: https://github.com/api7/lua-resty-healthcheck/blob/master/lib/resty/healthcheck.lua#L186

so we need to create the health checker in another phase like access which is support yield.

#1851

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible?

@membphis membphis marked this pull request as ready for review August 3, 2020 07:47
end

if nodes_count > 1 then
local checker = fetch_healthchecker(up_conf, route,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be better to move the creation of health-checker object to the set_directly function,
Sometimes, I call the set_directly function directly in the plugin,proxy to another uptream instead of the configuration in the route.

Copy link
Member Author

Choose a reason for hiding this comment

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

we can add this in new PR ^_^

@membphis membphis mentioned this pull request Aug 6, 2020
@membphis
Copy link
Member Author

@nic-chen @spacewander @moonming Do you have time to take a look at this PR?

@nic-chen
Copy link
Member

add some test cases for the changing?

@moonming
Copy link
Member

moonming commented Jan 5, 2021

ping @membphis

@membphis
Copy link
Member Author

membphis commented Jan 5, 2021

Wow, this is an old PR. I will process it when I have time.

If any other guys want to handle this feature, please let me know, then you can continue this job. ^_^

@spacewander
Copy link
Member

I will take care of it.
But since it is on @membphis's branch (which I can't easily operate) and there are many conflicts, I prefer to do it in a new PR.

@membphis
Copy link
Member Author

membphis commented Jan 7, 2021

we can close this PR after the new PR is created ^_^

@spacewander
Copy link
Member

Surpassed by #3240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants