-
Notifications
You must be signed in to change notification settings - Fork 661
Initial working Rust binding connection pool #4364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The Connection Pool is used only in the Database tests at the moment. So compiler does have dead code warnings.
All tests pass (while the dcefault is no ConnectionPool in the database)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review @jussisaurio
|
If the ConnectionPool is turned on then one test fails: I think the issue is with the way Connection drop "recycles" Connections into the ConenctionPool. As drop cannot (yet) be async, we can't call I'd love some feedback on how to resolve this (maybe something better than cloning the inner Connection in drop?) |
pool size by an order of magnitude if it is full. That would mean that available_connections would not be considered dead code.
Description
This adds a ConnectionPool instance to the rust binding Database. The default is for it to not be enabled, so same behaviour as default.
Motivation and context
The goal is to save execution time with a transparent ConnectionPool
Description of AI Usage
No AI used