mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-05-06 14:24:15 +02:00
sqlx.Open was called with no pool configuration, risking PostgreSQL connection exhaustion under load. Set max open/idle conns and lifetimes. CreatePost INSERT + soft-delete UPDATE were two separate queries with no transaction, risking inconsistent state on partial failure. CollectAdventure used SELECT then UPDATE without a lock, allowing concurrent guild members to double-collect. Now uses SELECT FOR UPDATE within a transaction.