Skip to content
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

WIP: Stable client indexes for target selection #588

Open
wants to merge 1 commit into
base: vtgateproxy-15
Choose a base branch
from

Conversation

henryr
Copy link

@henryr henryr commented Jan 21, 2025

No description provided.

@henryr henryr requested a review from a team as a code owner January 21, 2025 13:36
@github-actions github-actions bot added this to the v15.0.5 milestone Jan 21, 2025
@@ -319,11 +320,16 @@ func (b *JSONGateResolverBuilder) parse() (bool, error) {
// target lock and then comparing the previous targets with the current
// targets and only resetting pools which disappear.
targetCount.ResetAll()

idx := getClientIndex()
for poolType := range targets {
b.sorter.shuffleSort(targets[poolType], b.affinityField, b.affinityValue)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably for this approach we'd want to not do the random shuffleSort and instead make sure that the targets list is in a stable order?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants