feat(api): switch createDb to WebSocket Pool driver to enable applyTransition transactions
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 38/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- postgres, typescript
研究方向
Start by reading packages/api/src/db/index.ts and packages/api/src/lib/lifecycle/applyTransition.ts, then verify the nodejs_compat setting in wrangler.jsonc. Compare the current neon-http latency with neon-serverless, check the Cloudflare Workers integration and HTTP-only feature constraints, and run the 216+ test integration suite against staging. Done means the driver choice is validated, applyTransition is transactional if switched, and the comment and measurements are updated.
由索引模型根據 Issue 內容生成。
描述
Summary
packages/api/src/lib/lifecycle/applyTransition.ts documents itself as "sequential, not transactional" because @neondatabase/serverless HTTP driver (via drizzle-orm/neon-http) does not support db.transaction(). A crash between insertReview and updateArtifactStatus could leave a stranded review row that bumps the count toward a future publish without flipping the artifact.
Requirements
- Evaluate switching
createDb(packages/api/src/db/index.ts) fromneon-httptoneon-serverless(WebSocket Pool driver) - If switching, measure cold/warm latency impact (current is ~360ms cold / <200ms warm on neon-http)
- Wrap
applyTransitionbody indb.transaction(async tx => { ... })once Pool driver is in place - Update the comment in
applyTransition.tsto remove the TODO - Re-run the full integration test suite (216+ tests) against staging to confirm no regressions
Context
Flagged in the Plan 1 final review. At v1 admin write volumes the non-atomicity is acceptable; this issue gets more urgent as concurrent write volumes grow.
Implementation Notes
The Cloudflare Workers + neon-serverless integration requires nodejs_compat flag in wrangler.jsonc — verify before committing to the swap. Some HTTP-only Neon features may not be available via WebSocket.
- 主要語言
- HTML
- 星號
- 33
- 分支
- 107
- 平均合併
- 14 小時 6 分鐘
- 30 天內合併 PR
- 19
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
USRSE/usrse.github.io 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
USRSE/usrse.github.io#2117 ·
維護者通常 1 天內回覆
-
Update conference link from USRSE'26 to USRSE'27.可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 1/5 1 小時以內 新手友好度 63/100
USRSE/usrse.github.io#2115 · 1 則留言 ·
維護者通常 1 天內回覆
-
broken-links
難度 2/5 1-3 小時 新手友好度 88/100
USRSE/usrse.github.io#2099 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
USRSE/usrse.github.io#2085 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
USRSE/usrse.github.io#2001 ·
維護者通常 1 天內回覆
查看 USRSE/usrse.github.io 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
genfeedai/genfeed.ai#11828 ·
維護者通常 1 天內回覆
-
enhancement good first issue help wanted
難度 1/5 1 小時以內 新手友好度 83/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
ExpressionEngine/ExpressionEngine#5493 ·
維護者通常 5 天內回覆
-
難度 1/5 1 小時以內 新手友好度 95/100
-
integration: llama_cpp
難度 2/5 1-3 小時 新手友好度 78/100
home-assistant/core#195670 · 2 則留言 ·
維護者通常 1 天內回覆