Commit 5d4dc23
committed
NCBC-4201: Fix Stellar HTTP/2 retries and strict timeout enforcement
Motivation
==========
Stellar operations lacked proper timeout enforcement and often suffered
unbounded retry loops. Additionally, transient HTTP/2 transport errors
(like connection resets) surfaced as fatal internal errors instead of
being safely retried.
Modifications
============
- Enabled multiple HTTP/2 connections in StellarCluster to recover
cleanly from dead connections.
- Enforced strict timeouts via dynamically shrinking `RemainingTimeout`
in GrpcCallOptions, replacing broken retry-limit checks.
- Delegated timeout enforcement entirely to `DeadlineExceeded`.
- Mapped transient `HttpRequestException` and `IOException` transport
errors to `ServiceNotAvailable` to enable graceful retries.
Result
======
Transport resets now retry safely with backoff, matching other SDKs.
Initial requests and all retries strictly enforce their timeouts.
Change-Id: Id86e824769965f3985b677e236d57897e62f2f33
Reviewed-on: https://review.couchbase.org/c/couchbase-net-client/+/244798
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>1 parent f424dc2 commit 5d4dc23
13 files changed
Lines changed: 803 additions & 207 deletions
File tree
- src/Couchbase/Stellar
- Core/Retry
- KeyValue
- Management
- Buckets
- Collections
- Query
- Search
- Query
- Search
- tests/Couchbase.UnitTests/Stellar
- Core
- KeyValue
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
16 | 29 | | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
21 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
22 | 50 | | |
23 | 51 | | |
24 | 52 | | |
| |||
40 | 68 | | |
41 | 69 | | |
42 | 70 | | |
43 | | - | |
44 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
22 | 35 | | |
23 | 36 | | |
24 | | - | |
| 37 | + | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
| |||
48 | 61 | | |
49 | 62 | | |
50 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
51 | 73 | | |
52 | 74 | | |
53 | 75 | | |
| |||
205 | 227 | | |
206 | 228 | | |
207 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
208 | 239 | | |
209 | 240 | | |
210 | 241 | | |
| |||
253 | 284 | | |
254 | 285 | | |
255 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
256 | 315 | | |
0 commit comments