-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
base: master
Are you sure you want to change the base?
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? |
Fixes #12610
Description
Which issue(s) this PR fixes:
Fixes #
Checklist