Skip to content
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

Use has_broken as a is_valid check function #57

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jarnura
Copy link

@jarnura jarnura commented Nov 4, 2023

bb8::ConnectionManager has is_valid and has_broken methods. In make_pooled, there is no option to use has_broken.

Introducing a feature flag called use_has_broken_as_valid_check, with this feature flag, the is_valid method of bb8::ConnectionManager uses the has_broken method of r2d2's ManageConnection.

For Diesel, the has_broken method uses the is_broken method of Diesel Connection. 'Select 1' can be avoided for every get from the connection pool.

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.

1 participant