Commit 60aeaed
committed
fix: use ThreadLocalRandom for backoff jitter, disable OkHttp retry, strengthen test assertions
Replace the shared static Random instance with ThreadLocalRandom.current()
at the backoff call site and for the fan-out name generator in
MinioAsyncClient — eliminating shared-state CAS contention under concurrent
retry load.
Disable OkHttp's retryOnConnectionFailure in doExecuteAsync so the SDK's
executeWithRetry is the sole retry policy; previously OkHttp could silently
add an extra attempt on stale-connection IOExceptions, causing more total
attempts than maxRetries.
Strengthen the two remaining assertNotNull catch blocks in RetryTest
(testMaxRetriesOneDisablesRetry, testSetMaxRetriesPostConstruction) to typed
InvalidResponseException catches with responseCode()==500 assertions,
matching the pattern applied to the other tests in the previous commit.1 parent 53da859 commit 60aeaed
3 files changed
Lines changed: 10 additions & 10 deletions
File tree
- api/src
- main/java/io/minio
- test/java/io/minio
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | | - | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| 63 | + | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
97 | | - | |
98 | 96 | | |
99 | 97 | | |
100 | 98 | | |
| |||
318 | 316 | | |
319 | 317 | | |
320 | 318 | | |
321 | | - | |
| 319 | + | |
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
| |||
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
354 | | - | |
| 352 | + | |
| 353 | + | |
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
3370 | 3371 | | |
3371 | 3372 | | |
3372 | 3373 | | |
3373 | | - | |
| 3374 | + | |
3374 | 3375 | | |
3375 | 3376 | | |
3376 | 3377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
| 462 | + | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
| 484 | + | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
0 commit comments