fix: fail the restore stage when writes during backup fail

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 08:06:14 +03:00
co-authored by Claude Opus 5.5
parent 3e9ec10613
commit 5fe50db58b
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ RESTORE_LABEL ?= restore
bench_restore:
$(KEEP_AWAKE) uv run python bench/run.py --profile restore --label $(RESTORE_LABEL)
# то же на малых размерах (самопроверка, сценарий защиты), ~2 мин; в git
# то же на малых размерах (самопроверка, сценарий защиты), ~1,5 мин; в git
# не идёт
.PHONY: bench_restore_quick
bench_restore_quick:
+10
View File
@@ -2532,6 +2532,16 @@ class Bench:
),
)
written = parse_summary(stand.work_dir / "last.json")
# backup не должен мешать записи: k6 выходит с 0 и при ошибках
if (
written["requests_failed"]
or written["requests_ok"] != p.restore_write_load
):
raise BenchError(
f"size {name}: writes during backup: "
f"{written['requests_ok']} of {p.restore_write_load} ok, "
f"{written['requests_failed']} failed",
)
dump_bytes = dump.stat().st_size
counts_loaded = stand.table_counts()
self.say(