Version 7.0 Beta 9.7.21
Bug Fixes
-
PostgreSQL: connection pool exhaustion causing database to appear unreachable
- Fixed transaction leak in
GetCall()— when a system or talkgroup lookup failed, the open transaction was never rolled back, holding a DB connection with locks until PostgreSQL timed it out - Fixed
sendAvailableCallsToClient()— previously opened up to 1,000 simultaneous transactions while holding an outer cursor open, capable of draining the entire connection pool in a single client connect event - Added
SetConnMaxIdleTime(5 minutes)to the connection pool — idle connections are now returned after 5 minutes instead of being held open indefinitely - Halved max idle connections to reduce steady-state PostgreSQL backend load
- Fixed transaction leak in
-
PostgreSQL: SQL syntax errors on log inserts with quoted system/talkgroup names
- System names and tone set names containing single quotes (e.g.
'OH Cuyahoga GCRN','Weathersfield 41') were breaking log INSERT statements, causing every log write to silently fail - Switched
migrations.golog migration to parameterized queries
- System names and tone set names containing single quotes (e.g.
-
PostgreSQL: partial options commit with no error returned
Options.Write()could silently commit a partial set of options if any key failed to write, with no error returned to the caller- Rewrote
set()closure to stop on first failure, roll back the transaction, and propagate the error - Switched all options UPDATE/INSERT queries to parameterized queries
-
PostgreSQL: external API and file data interpolated directly into SQL
transcription_queue.go:result.Language(from external API) andresult.Confidencewere string-interpolated into SQL — switched to fully parameterized queriescall.go:AudioFilename,AudioMime, andTranscriptionStatuswere interpolated into the calls INSERT — moved to parameterized arguments
-
Transaction cleanup: missing rollbacks on error paths
admin.go: missingtx.Rollback()after a failedtx.Commit()on user deletionseeds.go: missingtx.Rollback()after failedtx.Commit()in both seed functions