• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #20105
89%

Build:
DEFAULT BRANCH: master
Ran 05 Dec 2025 11:24AM UTC
Jobs 1
Files 623
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Dec 2025 11:11AM UTC coverage: 88.639% (-0.008%) from 88.647%
#20105

push

github

web-flow
okhttp: Fix race condition overwriting MAX_CONCURRENT_STREAMS (#12548)

### What this PR does

This PR fixes a race condition in `OkHttpClientTransport` where
`MAX_CONCURRENT_STREAMS` sent by the server could be incorrectly
overwritten by the client's default initialization.

The fix simply reorders the initialization to happen **before** starting
the reader thread, ensuring that any updates from the server are
preserved.

### Note on Testing

I attempted to add a deterministic reproduction test, but reliably
simulating this specific race condition proved difficult without
intrusive changes.
I request reviewers to primarily verify the logical correctness of the
reordering. I am open to collaborating with the team to develop a
suitable test case if required.


### Future Work

This PR covers **Step 1** (Fixing the race condition) of the plan
discussed in #11985.
I plan to follow up with **Step 2** (Adding assertions to verify no
pending streams exist) in a separate PR.

Part of #11985

35173 of 39681 relevant lines covered (88.64%)

0.89 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
97.35
-0.88% ../okhttp/src/main/java/io/grpc/okhttp/OkHttpServerStream.java
1
87.6
-0.83% ../rls/src/main/java/io/grpc/rls/LinkedHashLruCache.java
3
95.05
-0.44% ../core/src/main/java/io/grpc/internal/RetriableStream.java
3
92.38
-0.95% ../xds/src/main/java/io/grpc/xds/client/ControlPlaneClient.java
5
95.27
0.1% ../xds/src/main/java/io/grpc/xds/client/BootstrapperImpl.java
10
94.65
0.14% ../xds/src/main/java/io/grpc/xds/client/XdsClientImpl.java
Jobs
ID Job ID Ran Files Coverage
1 #20105.1 05 Dec 2025 11:24AM UTC 623
88.64
Source Files on build #20105
  • Tree
  • List 623
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20105
  • 8d49dc1c on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc