Skip to content

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