Merge PR #6762: fix(ai): finalize all prepared statements in SqliteAuthCredentialStore.close() (@ajdiyassin)

This commit is contained in:
can1357
2026-07-28 10:58:58 +02:00
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -15,6 +15,9 @@
### Fixed
- Fixed Google Vertex AI multi-region locations `eu` and `us` building invalid hosts (`eu-aiplatform.googleapis.com` / `us-aiplatform.googleapis.com`) that 404. Both Gemini GenerateContent and Claude/OpenAI-compat Vertex routes now resolve the REP endpoints (`aiplatform.eu.rep.googleapis.com` / `aiplatform.us.rep.googleapis.com`).
### Fixed
- Fixed `SqliteAuthCredentialStore.close()` leaking eight prepared statements (`updateIfMatches`, `updateIfMatchesWithLease`, `deleteIfMatchesWithLease`, `deleteCachePrefix`, and the four credential-refresh-lease statements), which kept the SQLite connection alive after `close()`. On Windows the auth DB and its `-wal`/`-shm` files stayed locked, so temp-dir cleanup intermittently failed with `EBUSY`; on POSIX the handle leaked silently.
## [17.1.6] - 2026-07-27
+8
View File
@@ -7923,6 +7923,14 @@ export class SqliteAuthCredentialStore implements AuthCredentialStore {
this.#updateUsageHistoryStmt.finalize();
this.#insertUsageCostStmt.finalize();
this.#listUsageCostsStmt.finalize();
this.#updateIfMatchesStmt.finalize();
this.#updateIfMatchesWithLeaseStmt.finalize();
this.#deleteIfMatchesWithLeaseStmt.finalize();
this.#deleteCachePrefixStmt.finalize();
this.#acquireCredentialRefreshLeaseStmt.finalize();
this.#getCredentialRefreshLeaseStmt.finalize();
this.#renewCredentialRefreshLeaseStmt.finalize();
this.#releaseCredentialRefreshLeaseStmt.finalize();
this.#db.close();
}
}