fix: delete the object and the row in one locked cleanup transaction

Keep the committed mark, then delete the object and the row under the
same row lock, so an older replica without the mark check that waits on
the row finds it gone instead of promoting it to ready after the object
delete. A mixed-version stand is no worse than before the mark; document
the upgrade order (replicas first, cleaner last) and fix stale wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 22:08:29 +03:00
co-authored by Claude Opus 5.5
parent 6551839807
commit 5889ca2ad7
13 changed files with 384 additions and 136 deletions
+2 -1
View File
@@ -91,7 +91,8 @@ async def run(*, once: bool) -> int:
loop = asyncio.get_running_loop()
for signum in (signal.SIGTERM, signal.SIGINT):
loop.add_signal_handler(signum, stop.set)
# дальше сигналы обрабатывает цикл: текущая строка доводится
# дальше сигналы обрабатывает цикл: текущий шаг уборки доводится до
# commit или отката, новые не начинаются
early_stop.disarm()
engine = create_engine(settings.database)