Skip to content

wrr: use new-style atomic APIs#8815

Merged
easwars merged 1 commit into
grpc:masterfrom
easwars:wrr_atomic_idx
Jan 8, 2026
Merged

wrr: use new-style atomic APIs#8815
easwars merged 1 commit into
grpc:masterfrom
easwars:wrr_atomic_idx

Conversation

@easwars

@easwars easwars commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Use new-style atomic APIs instead of the old ones in the WRR scheduler type.

The changes made in this PR improve the code in the following ways:

  • Ergonomics: Method-based API vs function-based, no pointer management needed
  • Safety: Type safety prevents mixing atomic/non-atomic operations, eliminates pointer errors
  • Clarity: The atomic.Uint32 type makes atomic intent explicit from declaration

RELEASE NOTES: none

@easwars easwars added the Type: Internal Cleanup Refactors, etc label Jan 8, 2026
@easwars easwars added this to the 1.79 Release milestone Jan 8, 2026

@arjan-bal arjan-bal 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.

LGTM

@codecov

codecov Bot commented Jan 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.41%. Comparing base (9b39ae2) to head (3372132).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8815      +/-   ##
==========================================
+ Coverage   83.29%   83.41%   +0.11%     
==========================================
  Files         417      417              
  Lines       32980    32980              
==========================================
+ Hits        27470    27509      +39     
+ Misses       4099     4075      -24     
+ Partials     1411     1396      -15     
Files with missing lines Coverage Δ
balancer/weightedroundrobin/balancer.go 86.08% <100.00%> (-0.74%) ⬇️

... and 26 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 merged commit afd6cc7 into grpc:master Jan 8, 2026
14 of 16 checks passed
@easwars easwars deleted the wrr_atomic_idx branch January 8, 2026 22:10
mbissa pushed a commit to mbissa/grpc-go that referenced this pull request Feb 16, 2026
Use new-style atomic APIs instead of the old ones in the WRR scheduler
type.

The changes made in this PR improve the code in the following ways:

- Ergonomics: Method-based API vs function-based, no pointer management
needed
- Safety: Type safety prevents mixing atomic/non-atomic operations,
eliminates pointer errors
- Clarity: The atomic.Uint32 type makes atomic intent explicit from
declaration

RELEASE NOTES: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants