-
Notifications
You must be signed in to change notification settings - Fork 5.3k
upstream: Fix moving EDS hosts between priorities. #14483
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
Merged
mattklein123
merged 14 commits into
envoyproxy:master
from
transferwise:fix-priority-moves
Jan 13, 2021
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
327fe3a
Fix moving EDS hosts between priorities doesn't work.
JonathanO 6440ac8
"Fixed" handling of priority move combined with health endpoint change.
JonathanO 3a3d7a0
Add test for priority change in other direction.
JonathanO 68f3a80
Re add the original tests
JonathanO 79170af
Update comment to make the remove behaviour clearer.
JonathanO 86ff76e
Improved test for redis cluster host removal.
JonathanO db74977
Add TODO
JonathanO 6444dcc
Add missing doc comment
JonathanO 0b23cad
Use flat hash map as we don't need node stability.
JonathanO c6f3b6c
Convert HostMap to a flat_hash_map.
JonathanO b93018a
Update comment for consistency.
JonathanO 4527f05
Add changelog entry.
JonathanO 58da9c1
Use string_view for tracking addresses being added to this priority.
JonathanO d400f15
Revert "Use string_view for tracking addresses being added to this pr…
JonathanO File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Please add new doc comment on this above. I've been looking at this code recently and as you pointed out, it's already incredibly hard to understand. Any additional comments/corrections you can make would be very helpful.
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.
Also, as an aside, I'm always concerned about the perf impact to changes like this. It seems a shame we need yet another map/etc. One possible idea: Since this set is only used for temporary comparisons, could it be a flat_hash_set of string views to avoid copying? I think all of the string should live until the update function is done?
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.
Sorry did you look at this to see if we can use a hash_set of string_view vs. copied strings?
/wait-any
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'm not sure I can use a string_view here, although it's new to me, so I may be misunderstanding it's usage. I'm not sure I can assume liveness of the underlying data (See e.g. eds.cc:63 or redis_cluster.cc:101 for how that set is populated.)
I've switched new_hosts_for_current_priority to use a string_view as that should be safe (upstream_impl.cc:1419), although I don't know if that improves anything?
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 had second thoughts about new_hosts_for_current_priority too so reverted changing that.
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.
OK yeah I see that we aren't using stable strings in all places, which is unfortunate. I think there is a separate effort to do perf analysis of some of the xDS paths so I guess we can look at this independently. cc @htuch @jmarantz @pgenera @rojkov