feat(api): switch createDb to WebSocket Pool driver to enable applyTransition transactions
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- postgres, typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- HTML
- Sterne
- 33
- Forks
- 107
- Ø Merge
- 14 Std. 6 Min.
- Gemergte PRs (30 T.)
- 19
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus USRSE/usrse.github.io
-
update community awardsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
USRSE/usrse.github.io#2117 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 63/100
USRSE/usrse.github.io#2115 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
broken-links
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
USRSE/usrse.github.io#2099 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
USRSE/usrse.github.io#2085 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
USRSE/usrse.github.io#2001 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in USRSE/usrse.github.io
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
rubenarslan/formr#63 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
StreamPipe input stream: readWithTimeout(n, 0) blocks forever instead of returning immediatelyOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
qoretechnologies/qore#8159 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag