Files
mtusi2026lab5/evidence/outbox-crash.txt
T
2026-10-25 21:43:03 +03:00

20 lines
1.9 KiB
Plaintext

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
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
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
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
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