Skip to content

feat: support asyncio in session database service - #1316

Closed
condorcet wants to merge 1 commit into
google:mainfrom
condorcet:async_session_database_service
Closed

condorcet wants to merge 1 commit into
google:mainfrom
condorcet:async_session_database_service

Conversation

@condorcet

Copy link
Copy Markdown
Contributor

Fixes issue #1005

Currently, database session service only has async / await interface, but internally it doesn't use async driver. For production usage it is critical, because database operations block the event loop.

This changes allows to use async drivers in database session service.

This also introduce some breaking changes:

  1. Because of async / await we have to initialize tables in separate method (initialize_tables) and not in __init__. In general such separation of concerns seems appropriate, since table initialization can be a separate process (it could be run before application startup, can be part of CI / CD, can use other DSN etc).
  2. inspection was removed because it doesn't support async / await in such a simple way. Most likely, if someone needs inspection, it should be utilized as separate method / property of class to be ready to async / await specific. See more here

@google-cla

google-cla Bot commented Jun 11, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@phuoc-nguyen-ts

Copy link
Copy Markdown

The message ordering seems to be messed up when I use this

Telling the agent to list our convo till now, and it list information in a wrong order. Which did not happen with the sync version

@condorcet
condorcet force-pushed the async_session_database_service branch from 163ee24 to 7274b0c Compare August 23, 2025 07:15
@condorcet

Copy link
Copy Markdown
Contributor Author

I believe this is because the MR is outdated, the logic of ordering has been changed some time ago.
@phuoc-nguyen-ts MR was actualized, can you check this?

@condorcet
condorcet force-pushed the async_session_database_service branch from 7274b0c to 087a5cc Compare September 7, 2025 21:28
@condorcet
condorcet force-pushed the async_session_database_service branch from 087a5cc to 4a84596 Compare September 8, 2025 06:03
@rohityan rohityan self-assigned this Oct 3, 2025
@rohityan

rohityan commented Oct 3, 2025

Copy link
Copy Markdown
Collaborator

Hi @condorcet and thanks to everyone who participated in this thread.

We're currently doing some housekeeping on our pull request queue. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this pull request needs to be caught up to the latest version. To help us keep our backlog focused on current pull requests, we are closing this as stale.

If you're still interested in contributing to this change, could you please update to the very latest version of the library and create a new pull request? Our team will be glad to help with the refreshed PRs and answer any questions!

Thanks for your contribution and understanding!

@rohityan rohityan closed this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants