forked from mtusi2026/mtusi2026lab5
Аудит F01, F11, F12, F13: гонка janitor/replay, версия pipeline, схема сообщения, срок задания
- F01: janitor под блокировкой jobs+attachments перепроверяет условие, снимает staging_key и только после COMMIT удаляет объект; replay перечитывает staging_key отдельным запросом под блокировкой вложения (в READ COMMITTED соединённые колонки могли остаться из старого снимка); тест трёх порядков, включая чередование из аудита (учебная пауза JANITOR_PAUSE_AFTER_SELECT_SECONDS) - F11: pipeline_version пишется при создании вложения; API не стартует с неподдерживаемой версией - F12: строгий разбор по jobs.schema.json (bool, RFC 3339, traceparent, tracestate); 17 случаев совпадают с jsonschema Draft 2020-12 - F13: единый срок задания на чтение staging, transform и запись; после срока аренда не продлевается, работа прерывается как processing_timeout
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"scenario": "janitor staging cleanup vs operator replay",
|
||||
"date_utc": "2026-11-13T17:53:11+00:00",
|
||||
"steps": [
|
||||
{
|
||||
"t": 18.13,
|
||||
"utc": "17:52:44.531",
|
||||
"step": "three failed attachments prepared",
|
||||
"ids": [
|
||||
"8c358e55-93cd-4c94-b009-740edea9cbfd",
|
||||
"556e0db9-9aea-4c19-81bf-8bb613cb1acf",
|
||||
"d575d080-f819-4f4c-9b2f-4fa30ab055d8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 26.93,
|
||||
"utc": "17:52:53.329",
|
||||
"step": "C: janitor selected z, replay committed, janitor rechecked under lock and skipped -> ready",
|
||||
"attachment_id": "8c358e55-93cd-4c94-b009-740edea9cbfd",
|
||||
"janitor_candidates_included_z": true,
|
||||
"replay": "replayed",
|
||||
"janitor_staging_skipped_changed": 1,
|
||||
"janitor_staging_failed_expired": 0,
|
||||
"final": "ready",
|
||||
"janitor_released_staging": false,
|
||||
"events": [
|
||||
"enqueued",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"failed",
|
||||
"replayed",
|
||||
"claimed",
|
||||
"ready",
|
||||
"staging_deleted"
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 33.23,
|
||||
"utc": "17:52:59.629",
|
||||
"step": "A: replay first -> janitor leaves it -> ready",
|
||||
"attachment_id": "556e0db9-9aea-4c19-81bf-8bb613cb1acf",
|
||||
"replay": "replayed",
|
||||
"staging_object_present": true,
|
||||
"final": "ready"
|
||||
},
|
||||
{
|
||||
"t": 38.81,
|
||||
"utc": "17:53:05.210",
|
||||
"step": "B: janitor first -> replay refused, no job without source",
|
||||
"attachment_id": "d575d080-f819-4f4c-9b2f-4fa30ab055d8",
|
||||
"janitor_staging_failed_expired": 1,
|
||||
"replay": "refused_staging_expired",
|
||||
"status": "failed",
|
||||
"staging_key": null,
|
||||
"staging_objects": [],
|
||||
"events": [
|
||||
"claimed",
|
||||
"failed",
|
||||
"staging_released"
|
||||
]
|
||||
},
|
||||
{
|
||||
"t": 45.41,
|
||||
"utc": "17:53:11.809",
|
||||
"step": "workers restored to .env configuration"
|
||||
}
|
||||
],
|
||||
"results": {
|
||||
"C_janitor_selected_then_replay": {
|
||||
"attachment_id": "8c358e55-93cd-4c94-b009-740edea9cbfd",
|
||||
"janitor_candidates_included_z": true,
|
||||
"replay": "replayed",
|
||||
"janitor_staging_skipped_changed": 1,
|
||||
"janitor_staging_failed_expired": 0,
|
||||
"final": "ready",
|
||||
"janitor_released_staging": false,
|
||||
"events": [
|
||||
"enqueued",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"retry_scheduled",
|
||||
"claimed",
|
||||
"failed",
|
||||
"replayed",
|
||||
"claimed",
|
||||
"ready",
|
||||
"staging_deleted"
|
||||
]
|
||||
},
|
||||
"A_replay_then_janitor": {
|
||||
"attachment_id": "556e0db9-9aea-4c19-81bf-8bb613cb1acf",
|
||||
"replay": "replayed",
|
||||
"staging_object_present": true,
|
||||
"final": "ready"
|
||||
},
|
||||
"B_janitor_then_replay": {
|
||||
"attachment_id": "d575d080-f819-4f4c-9b2f-4fa30ab055d8",
|
||||
"janitor_staging_failed_expired": 1,
|
||||
"replay": "refused_staging_expired",
|
||||
"status": "failed",
|
||||
"staging_key": null,
|
||||
"staging_objects": [],
|
||||
"events": [
|
||||
"claimed",
|
||||
"failed",
|
||||
"staging_released"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user