feat(api): switch createDb to WebSocket Pool driver to enable applyTransition transactions
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- postgres, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- HTML
- Star
- 33
- Fork
- 107
- Merge trung bình
- 14 giờ 6 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của USRSE/usrse.github.io
-
update community awardsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
USRSE/usrse.github.io#2117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 63/100
USRSE/usrse.github.io#2115 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken URLs on the websiteĐang mởbroken-links
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
USRSE/usrse.github.io#2099 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
USRSE/usrse.github.io#2085 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
USRSE/usrse.github.io#2001 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của USRSE/usrse.github.io
Issue tương tự
-
Calc 1.1: inconsistent duplicate facts with equal `decimals` don't stop the calculation checkĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubenarslan/formr#63 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
StreamPipe input stream: readWithTimeout(n, 0) blocks forever instead of returning immediatelyĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
qoretechnologies/qore#8159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày