Remove db.close() from handle_db_errors error handler
#38
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#38
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
app/dependencies.py:774-778— The error handler explicitly closes a pooled database connection after rollback. Combined with manualdb.close()calls in route handlers, connections may be returned to the pool twice, causing pool state corruption. Connection management should be centralized.Priority: medium | Labels: bug, tech-debt
Fixed in PR #42: #42
Removed the
finallyblock fromhandle_db_errorsthat calleddb.close()after rollback. With PostgreSQL connection pooling, route handlers already managedb.close()themselves — closing again in the error handler risked returning connections to the pool twice, corrupting pool state.