Commit 73abb48
authored
core: Fix inFlightSubStreams counting on retry commit (#12649)
This PR fixes a race condition in RetriableStream where, under certain
retry and deadline timings, the response future may never be completed.
When a deadline cancellation occurs concurrently with retry commit,
inFlightSubStreams may not be decremented, causing
`ClientCallImpl.ClientStreamListenerImpl.closed` to never be invoked. As
a result, blockingUnaryCall can hang indefinitely.
After this change, the inFlightSubStreams counting is consistent
whenever a scheduled retry is committed, ensuring the close signal is
always delivered.
I verified this using the issue reproduction code from the issue
reporter, which previously caused blockingUnaryCall to hang and
eventually hit a TimeoutException because a while loop never progressed.
After this change, running the same reproduction code no longer hangs
and continues as expected without timing out.
Fixes #126201 parent 024fdd0 commit 73abb48
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | | - | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
0 commit comments