forked from mtusi2026/mtusi2026lab5
исправление
This commit is contained in:
+12
-12
@@ -1,19 +1,19 @@
|
||||
python student-tests/outbox_crash.py
|
||||
A. api_after_commit: the client got 502 instead of 202, but the attachment 44f59913-f920-4d36-82d5-fea3d61ce5b7 and its outbox row were committed before the crash
|
||||
ready without creating a new job by hand; api restarted by Docker: ['ef44b0d4c0a1']
|
||||
outbox: row 41 published 2026-10-25T18:23:23.278264+00:00 by relay-b0db3e40abfe
|
||||
A. api_after_commit: the client got 502 instead of 202, but the attachment 68ccecb0-ae64-4a1d-a235-63219f66c403 and its outbox row were committed before the crash
|
||||
ready without creating a new job by hand; api restarted by Docker: ['48dc392933dc']
|
||||
outbox: row 130 published 2026-10-26T16:18:31.010950+00:00 by relay-c1b7e1ab5673
|
||||
events: queued -> claimed -> ready
|
||||
B. relay_before_publish: upload -> 202 (0d6338d9-fa65-459d-9d54-53cc385700d4); every relay that takes the row crashes before publishing
|
||||
crashed and restarted: ['b0db3e40abfe', 'ef44b0d4c0a1']; after restart the row was published once -> ready
|
||||
outbox: row 42 published 2026-10-25T18:23:32.331225+00:00 by relay-ef44b0d4c0a1
|
||||
B. relay_before_publish: upload -> 202 (780f7bd8-df89-4c70-84fa-9d90f35879fa); every relay that takes the row crashes before publishing
|
||||
crashed and restarted: ['48dc392933dc', 'c1b7e1ab5673']; after restart the row was published once -> ready
|
||||
outbox: row 131 published 2026-10-26T16:18:40.873234+00:00 by relay-48dc392933dc
|
||||
events: queued -> claimed -> ready
|
||||
C. relay_after_publish: upload -> 202 (cf7c7e33-78ee-48c1-9bc5-7acefbf49d40); the broker confirms, the relay crashes before marking the row
|
||||
crashed and restarted: ['b0db3e40abfe', 'ef44b0d4c0a1']; the same message was delivered again 1 time(s): duplicate_ignored
|
||||
outbox: row 43 published 2026-10-25T18:23:40.297286+00:00 by relay-ef44b0d4c0a1
|
||||
C. relay_after_publish: upload -> 202 (87559a9a-a61c-4a10-999c-516b5e1f481a); the broker confirms, the relay crashes before marking the row
|
||||
crashed and restarted: ['48dc392933dc', 'c1b7e1ab5673']; the same message was delivered again 1 time(s): duplicate_ignored
|
||||
outbox: row 132 published 2026-10-26T16:18:48.678466+00:00 by relay-48dc392933dc
|
||||
events: queued -> claimed -> ready -> duplicate_ignored
|
||||
still one set of variants: 3 rows, 3 objects
|
||||
D. broker stopped: upload -> 202 (094e50ca-898e-4c19-9d39-1b80721409ab), after 5 s status queued, outbox row 44 not published yet (it waits in PostgreSQL)
|
||||
broker started: the relay published the row, ready 6.4 s later
|
||||
outbox: row 44 published 2026-10-25T18:24:08.645165+00:00 by relay-ef44b0d4c0a1
|
||||
D. broker stopped: upload -> 202 (87e3efc2-e44b-4260-8129-7fadffec4811), after 5 s status queued, outbox row 133 not published yet (it waits in PostgreSQL)
|
||||
broker started: the relay published the row, ready 11.8 s later
|
||||
outbox: row 133 published 2026-10-26T16:19:07.785521+00:00 by relay-48dc392933dc
|
||||
events: queued -> claimed -> ready
|
||||
PASS: a crash between COMMIT and publish (A, B) loses nothing — the outbox row is published later and the job becomes ready without manual action; a crash after publish (C) only causes a duplicate delivery, which the worker acknowledges without a second set of variants; while the broker is down (D) uploads are still accepted and the jobs wait in the outbox
|
||||
|
||||
Reference in New Issue
Block a user