Commit aba8cb1
committed
CLDSRV-992: Bound and settle the 1000-object writes in Multi-Object Delete setup
The "Multi-Object Delete Success" beforeEach uploads 1000 objects behind what
looks like a concurrency limiter of 20. It is not one. objects.map() invokes all
1000 async calls synchronously; the first 20 push and the other 980 all park on
the same `await Promise.race(queued)`. When the first put settles they all wake,
and each splices one entry off the head of the queue regardless of whether that
entry had settled, so the queue empties, every waiter's `while` test goes false,
and the remaining puts fire together. Running the limiter against an
instrumented stub gives a peak of 999 concurrent puts against an intended 20.
That is the ServiceUnavailable seen in run 33681270087: a thousand simultaneous
puts, not twenty.
It also explains why one failure becomes seven. Promise.all rejects on the first
error while the other puts are still in flight, so the hook throws with writes
outstanding, and the bucket cannot be deleted. All four suites in this file
share the bucket name multi-object-delete-234-634, so once it is left behind
with objects in it, every later suite's cleanup fails with BucketNotEmpty --
which is exactly the shape of the run: one ServiceUnavailable followed by six
BucketNotEmpty.
Two changes, both already present on development/9.3 and newer in one form or
another:
- Replace the limiter with a fixed pool of 20 workers draining a shared queue.
Concurrency is genuinely bounded and every put is settled before the hook
returns, on the failure path too, so teardown can no longer race them.
- Empty the bucket before deleting it in all four cleanup hooks. The 9.3 line
gained this in 9eb5777, but that commit is an aws-sdk v3 migration of the
whole file and is not something to cherry-pick onto 9.2; this is the
equivalent written for the v2 client, and nothing else from it.
Clears CLDSRV-992 row F10 (all seven failures).
Issue: CLDSRV-9921 parent ce53804 commit aba8cb1
1 file changed
Lines changed: 42 additions & 19 deletions
Lines changed: 42 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
76 | 93 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
93 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
94 | 108 | | |
95 | 109 | | |
96 | 110 | | |
| |||
150 | 164 | | |
151 | 165 | | |
152 | 166 | | |
153 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
154 | 171 | | |
155 | 172 | | |
156 | 173 | | |
| |||
240 | 257 | | |
241 | 258 | | |
242 | 259 | | |
243 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
244 | 264 | | |
245 | 265 | | |
246 | 266 | | |
| |||
339 | 359 | | |
340 | 360 | | |
341 | 361 | | |
342 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
343 | 366 | | |
344 | 367 | | |
345 | 368 | | |
| |||
0 commit comments