Skip to content

pickfirstleaf: fix bug in address de-duplication#8611

Merged
arjan-bal merged 1 commit into
grpc:masterfrom
arjan-bal:pf-dedup-bug
Oct 3, 2025
Merged

pickfirstleaf: fix bug in address de-duplication#8611
arjan-bal merged 1 commit into
grpc:masterfrom
arjan-bal:pf-dedup-bug

Conversation

@arjan-bal

@arjan-bal arjan-bal commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

Due to a bug in the new pickfirst balancer, it wasn't de-duplicating addresses in the resolver update. The only user visible impact of this seems to be less frequent picker updates after the first pass in happy eyeballs and incorrect interleaving of IPv4/IPv6 addresses during the first happy eyeballs pass.

RELEASE NOTES:

  • balancer/pickfirst: Fix a bug where duplicate addresses were not being ignored as intended.

@arjan-bal arjan-bal added this to the 1.77 Release milestone Sep 26, 2025
@arjan-bal arjan-bal added Type: Bug Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. labels Sep 26, 2025
@codecov

codecov Bot commented Sep 26, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.97%. Comparing base (bb71072) to head (fb56e8e).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8611      +/-   ##
==========================================
- Coverage   82.00%   81.97%   -0.03%     
==========================================
  Files         415      415              
  Lines       40697    40698       +1     
==========================================
- Hits        33372    33364       -8     
- Misses       5937     5945       +8     
- Partials     1388     1389       +1     
Files with missing lines Coverage Δ
balancer/pickfirst/pickfirstleaf/pickfirstleaf.go 88.08% <100.00%> (+1.00%) ⬆️

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@easwars

easwars commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

This part of the description is very confusing:
The only user visible impact of this seems to be more less frequent picker updates

@easwars easwars left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The release note doesn't seem to indicate that we are actually fixing a bug. It looks more like we are adding the logic to dedup addresses. Although technically this PR is doing that since we weren't deduping before :)

@easwars easwars assigned arjan-bal and unassigned easwars and dfawley Oct 1, 2025
@arjan-bal

Copy link
Copy Markdown
Contributor Author

This part of the description is very confusing: The only user visible impact of this seems to be more less frequent picker updates

Fixed. It should have been "less frequent picker updates" since the address list would be longer. I changed the phrasing of the sentence midway through typing it.

The release note doesn't seem to indicate that we are actually fixing a bug. It looks more like we are adding the logic to dedup addresses. Although technically this PR is doing that since we weren't deduping before :)

Updated the release notes to mention that not ignoring duplicate addresses was a bug and it is being fixed.

@arjan-bal arjan-bal merged commit 9a1d8d8 into grpc:master Oct 3, 2025
28 of 29 checks passed
@arjan-bal arjan-bal deleted the pf-dedup-bug branch October 3, 2025 04:05
Pranjali-2501 pushed a commit to Pranjali-2501/grpc-go that referenced this pull request Oct 6, 2025
Due to a bug in the new pickfirst balancer, it wasn't de-duplicating
addresses in the resolver update. The only user visible impact of this
seems to be less frequent picker updates after the first pass in happy
eyeballs and incorrect interleaving of IPv4/IPv6 addresses during the
first happy eyeballs pass.

RELEASE NOTES:
* balancer/pickfirst: Fix a bug where duplicate addresses were not being ignored as intended.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Area: Resolvers/Balancers Includes LB policy & NR APIs, resolver/balancer/picker wrappers, LB policy impls and utilities. Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants