-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: reloading after any node failure in eureka will lose half of the requests #12695
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
Conversation
解决eureka任意节点故障后执行reload会丢失一半请求 apache#12610
reloading after any node failure in eureka will lose half of the requests
| metadata = metadata, | ||
| }) | ||
| if metadata then | ||
| -- remove useless data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
| end | ||
|
|
||
| local json_str = res.body | ||
| local data, err = core.json.decode(json_str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change necessary?
| local init_sema | ||
| local initial_fetched = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain some of the functions of this?
|
|
||
| local request_uri, basic_auth = service_info() | ||
| if not request_uri then | ||
| local endpoints = build_endpoints() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to execute build_endpoints directly during the init_worker phase.
|
Hi @wisonzhu, thanks for your contribution. I left some comments. |
|
Hi @wisonzhu, any updates? |
|
Hi @wisonzhu, following up on the previous review comments. Please let us know if you have any updates. Thank you. |
|
Hi, thx for your PR. Because the PR has been inactive for too long and the community needs to fix the corresponding issue, I fixed the issue in #12906. Therefore, this PR can be closed. Thanks again for your help. |
Fixes #12610
Description
Which issue(s) this PR fixes:
Fixes #
Checklist