Commit 0b8ae6d
committed
test: pin ordering under concurrent transmit drains
A Greptile review of the branch flagged concurrent effect workers on
one actor as an ordering hazard: a later effect's drain deliberately
includes a processing sibling, so two workers can deliver overlapping
envelope sets. The overlap is the documented at-least-once design and
the ingest dedups it on transmit:<effectId>; the reorder cannot
happen, because a drain delivers older siblings first and only sends
a later envelope after the earlier delivery returned successfully.
This test forces the exact interleaving: worker A claims the early
effect and stalls inside its delivery, worker B claims the later
effect and drains both, then A finishes as a deduplicated replay. The
mirror applies [1, 2] and both effects complete. Against a neutered
drain that delivers only the claimed effect, the same interleaving
fails with the reordering the review predicted, so the test observes
the guarantee rather than the implementation.1 parent 0ef596b commit 0b8ae6d
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
182 | 222 | | |
183 | 223 | | |
184 | 224 | | |
| |||
0 commit comments