3 Commits
Author SHA1 Message Date
dualfroz 27bb51affa Describe this repository 2026-10-22 21:03:54 +02:00
dualfroz 3461e6bce4 fix: stop prepared statement cache cleanup goroutine on Close
The expirable LRU cache backing the prepared statement store starts a
background deleteExpired goroutine when it is created with a non-zero TTL.
Its Close method was commented out, so the goroutine kept running for the
lifetime of the process and leaked every time a PreparedStmtDB was
discarded (for example when a *sql.DB is closed and reopened), causing
steady goroutine and memory growth in long-running services.

Expose LRU.Close, add Close to the stmt_store.Store interface and its
lruStore implementation, and call it from PreparedStmtDB.Close so the
background cleanup goroutine is stopped together with the cached
statements. Close is idempotent and safe for concurrent use.

Refs #7788
2026-09-02 11:03:59 +02:00
upstream 6182f42ca4 Upstream go-gorm/gorm state of the touched files before 82384c4ab0 2026-09-02 11:03:59 +02:00