Skip to content

feat(seasonpass): bump mainnet image to git-887fe57 (deploy #308 GQL-out-of-txn + #306 pool 60)#3496

Merged
ipdae merged 1 commit into
mainfrom
yang/seasonpass-deploy-308-gql-out-of-txn
Jun 29, 2026
Merged

feat(seasonpass): bump mainnet image to git-887fe57 (deploy #308 GQL-out-of-txn + #306 pool 60)#3496
ipdae merged 1 commit into
mainfrom
yang/seasonpass-deploy-308-gql-out-of-txn

Conversation

@ipdae

@ipdae ipdae commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What

Bumps the mainnet seasonpass.image.tag from git-ba5228c to git-887fe57.

#308 (fix/gql-outside-db-txn) is stacked on #306, so this single tag bump ships both on top of the currently-live ba5228c:

commit change PR
485b172 raise DB pool 30 → 60 (absorb connection holds) #306
887fe57 call cleared-stage RPC outside the DB transaction #308

(Live ba5228c already had cc9e3f8 async /ping + ba5228c anyio threadpool cap.)

Why

Repeated block-status / invalid-claim alarms (Assertible → PagerDuty / #9c-mainnet-alert). Root cause caught live via pg_stat_activity: a status request held a user_season_pass row lock idle-in-transaction for 150s+ while doing a slow get_last_cleared_stage GQL call. That piled up claim SELECT ... FOR UPDATE waiters (up to ~1300s), drove the SQLAlchemy pool to 30/30, and timed out every DB endpoint → both monitors tripped together.

#308 moves the GQL call out of the transaction in the three status paths (get_default_usp WORLD_CLEAR, user_status/all_user_status exp==0 refetch): capture the needed scalars, rollback() to release the connection/lock, then do the RPC. #306's pool 60 is the headroom backstop.

Review

code-reviewer verdict: merge — no blocking issues on the production money-path.

  • ✅ Verified: no DetachedInstanceError on happy path (FastAPI serializes before session teardown; expired-but-attached objects lazy-reload). season_pass=season_pass_id= safe. No write loss. outer try/except handles RPC timeout without connection leak.
  • 🟡 non-blocking follow-ups: (1) narrow rollback()commit() concurrent-delete window can 500 on ObjectDeletedError (low probability — these rows are rarely deleted); (2) expire_on_commit lazy-reload adds extra checkouts at serialization (net-positive vs the long holds).
  • 🟢 minor: loop-var pass_type shadowing; status-endpoint test gap.

Migrations

None coupled. The #307 partial index (idx_claim_unsettled) is already applied live, and this code works with or without it. Migrations are applied manually (no init-container/Job).

Deploy

ArgoCD 9c-external-services has no auto-sync — after merge, manual sync required:

kubectl -n argocd patch applications.argoproj.io 9c-external-services --type merge \
  -p '{"operation":{"initiatedBy":{"username":"admin"},"sync":{"revision":"HEAD"}}}'

🤖 Generated with Claude Code

…out-of-txn + #306 pool 60)

#308 is stacked on #306, so this single tag bump ships both on top of the
currently-live ba5228c:
  485b172  raise DB pool 30 -> 60                                  [#306]
  887fe57  call cleared-stage RPC outside the DB transaction       [#308]

The #308 refactor moves the slow get_last_cleared_stage GQL call out of the
DB transaction in the status paths, so a request no longer holds a
user_season_pass row lock idle-in-transaction across that RPC. That hold was
piling up claim "SELECT ... FOR UPDATE" waiters and exhausting the SQLAlchemy
pool, timing out every DB endpoint and tripping the block-status /
invalid-claim monitors together.

code-reviewer verdict: merge — intended behavior verified (no DetachedInstanceError
on the happy path; rollback releases the connection/lock before the RPC). Known
follow-ups (non-blocking): narrow guard for the rollback->commit concurrent-delete
window, and status-endpoint integration tests.

No migration coupling: the #307 partial index is already applied live and the
code works with or without it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ipdae ipdae merged commit 2751085 into main Jun 29, 2026
3 checks passed
@ipdae ipdae deleted the yang/seasonpass-deploy-308-gql-out-of-txn branch June 29, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant