This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Upgrade SQLAlchemy v1.4 for native asyncio support (#406)
* fix: a long-standing transaction error - It is now reproducible reliably with the new SQLAlchemy + asyncpg combination! - Also fixed a hidden type conversion bug in AgentRegistry.set_kernel_status() due to a comma typo.... * fix/test: Update codes for population of DB fixtures - Eliminate manual primary key checks for duplicate entries by utilizing PostgreSQL's "on conflict" (upsert) support. - Fix up using special characters in database passwords by correctly escaping them using `urllib.parse.quote_plus()`. * fix: Do not rely on `rowcount` for SELECT queries - rowcount in SQLAlchemy does NOT represent the number of fetched rows for SELECT queries, in contrast to the Python's standard DB API. * fix: excessive DB connection establishment delay and optimize GQL queries - refs MagicStack/asyncpg#530: apply "jit: off" option to DB connections - It is specified in `ai.backend.manager.models.base.pgsql_connect_opts` - Reuse the same single connection for all GraphQL resolvers and mutation methods * fix: consistently use urlquote for db passwords * fix: all DB connections are now transactions * refactor: Finally, rename "dbpool" to "db"
- Loading branch information
Showing
52 changed files
with
1,880 additions
and
1,787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Upgrade SQLAlchemy to v1.4 for native asyncio support and better transaction/concurrency handling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.