Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Should not mark a connection as invalid after exception #274

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

Open
knuclechan opened this issue Dec 3, 2021 · 2 comments
Open

Should not mark a connection as invalid after exception #274

knuclechan opened this issue Dec 3, 2021 · 2 comments

Comments

@knuclechan
Copy link

At com.github.jasync.sql.db.pool.ConnectionFactory#validate(), it will mark the connection as invalid after exception like sql syntax error or duplicate key. But the connection is still valid to use. I think only network/connection error should invalidate a connection

@github-actions
Copy link

github-actions bot commented Dec 3, 2021

Thank you for reporting an issue. See the wiki for documentation and gitter for questions.

@oshai
Copy link
Contributor

oshai commented Dec 5, 2021

IIRC the reason to do that is to avoid cases of buffers not getting cleaned and some edge cases. I think it's better to play it on the safe side on this case.
Do you see any implications with the current approach?
Perhaps we can "white-list" some errors that will not invalidate the connection (like the ones you mentioned above) by adding test cases for those.

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

No branches or pull requests

2 participants