From 9357d1592df9fcd77d7f8a7d1768e1694af0ce5d Mon Sep 17 00:00:00 2001 From: hyungi Date: Mon, 29 Jun 2026 13:23:16 +0900 Subject: [PATCH] =?UTF-8?q?fix(publish):=20=EB=A7=88=EC=9D=B4=EA=B7=B8=20?= =?UTF-8?q?=EB=B2=88=ED=98=B8=20377=E2=86=92378=20(=EB=A9=80=ED=8B=B0?= =?UTF-8?q?=EC=84=B8=EC=85=98=20prod=20377=5Fdomain=5Fbucket=20=EC=B6=A9?= =?UTF-8?q?=EB=8F=8C=20=ED=9A=8C=ED=94=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 검수 fix 작업 중 다른 세션이 prod 에 377_domain_bucket(ee3b347)을 선점·배포 → publish_outbox attempts/failed 마이그를 378 로 리넘버(브랜치를 ee3b347 로 rebase). 모델 주석도 mig378 로 정정. 내 fix 8건은 새 prod 커밋과 파일 무충돌(번호만 조정). Co-Authored-By: Claude Opus 4.8 (1M context) --- app/models/published.py | 2 +- ...empts_failed.sql => 378_publish_outbox_attempts_failed.sql} | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename migrations/{377_publish_outbox_attempts_failed.sql => 378_publish_outbox_attempts_failed.sql} (80%) diff --git a/app/models/published.py b/app/models/published.py index fe6db50..f855703 100644 --- a/app/models/published.py +++ b/app/models/published.py @@ -56,7 +56,7 @@ class PublishOutbox(Base): DateTime(timezone=True), default=datetime.now, nullable=False ) processed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) - # mig377: 행별 격리 재시도/terminal. attempts=savepoint 실패 누적, failed_at=MAX 초과 terminal + # mig378: 행별 격리 재시도/terminal. attempts=savepoint 실패 누적, failed_at=MAX 초과 terminal # (set 시 워커 select 에서 제외 → head-of-line block 방지). attempts: Mapped[int] = mapped_column(SmallInteger, nullable=False, default=0) failed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True)) diff --git a/migrations/377_publish_outbox_attempts_failed.sql b/migrations/378_publish_outbox_attempts_failed.sql similarity index 80% rename from migrations/377_publish_outbox_attempts_failed.sql rename to migrations/378_publish_outbox_attempts_failed.sql index f55387d..28abfff 100644 --- a/migrations/377_publish_outbox_attempts_failed.sql +++ b/migrations/378_publish_outbox_attempts_failed.sql @@ -1,4 +1,5 @@ --- 377_publish_outbox_attempts_failed.sql +-- 378_publish_outbox_attempts_failed.sql +-- (번호: 멀티세션 중 prod 가 377_domain_bucket 을 선점 → 378 로 리넘버.) -- publish_outbox poison row head-of-line block 차단. 발행 워커가 행별 savepoint 격리 후 -- 예외 시 attempts++ 하고 MAX 초과 시 failed_at 스탬프(terminal) → 그 행을 select 에서 제외해 -- 후속 발행이 막히지 않게 함. 기존 미처리 행은 attempts=0 / failed_at=NULL 로 정상 재처리.