fix: reloading after any node failure in eureka will lose half of the requests#12695
Closed
wisonzhu wants to merge 2 commits intoapache:masterfrom
Closed
fix: reloading after any node failure in eureka will lose half of the requests#12695wisonzhu wants to merge 2 commits intoapache:masterfrom
wisonzhu wants to merge 2 commits intoapache:masterfrom
Conversation
解决eureka任意节点故障后执行reload会丢失一半请求 apache#12610
Revolyssup
requested changes
Oct 23, 2025
reloading after any node failure in eureka will lose half of the requests
Baoyuantop
reviewed
Nov 3, 2025
| metadata = metadata, | ||
| }) | ||
| if metadata then | ||
| -- remove useless data |
| end | ||
|
|
||
| local json_str = res.body | ||
| local data, err = core.json.decode(json_str) |
Contributor
There was a problem hiding this comment.
Is this change necessary?
Comment on lines
+36
to
+37
| local init_sema | ||
| local initial_fetched = false |
Contributor
There was a problem hiding this comment.
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() |
Contributor
There was a problem hiding this comment.
I think it's better to execute build_endpoints directly during the init_worker phase.
Contributor
|
Hi @wisonzhu, thanks for your contribution. I left some comments. |
Contributor
|
Hi @wisonzhu, any updates? |
Contributor
|
Hi @wisonzhu, following up on the previous review comments. Please let us know if you have any updates. Thank you. |
Member
|
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. |
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.
Fixes #12610
Description
Which issue(s) this PR fixes:
Fixes #
Checklist