Fix CheckHealth not set has_request_code#1502
Merged
wwbmmm merged 1 commit intoapache:masterfrom Feb 25, 2022
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
loadbalancer:c_murmurhash
当某个下游实例由于某些原因被SetFailed之后,后台会启动一个健康检查线程定时(间隔由参数-health_check_interval控制)检查被屏蔽的实例是否恢复正常。
对于hash类型的loadbalancer,SelectServer(const SelectIn& in, SelectOut* out)函数中的in.has_request_code必须是true,否则会输出错误日志并返回错误(EINVAL)
如果下游实例只有几个,在某些情况下,有可能这些实例都被SetFailed了,从而导致后续的所有的请求都会失败。