Fix connection validation failed after restarting database
Make sure that:
- [x] You have read the contribution guidelines.
- [x] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
- [x] You use the code formatters provided here and have them applied to your changes. Don't submit any formatting related changes.
- [x] You submit test cases (unit or integration tests) that back your changes.
Issue description
After restarting database or disconnecting from database, all or some of connections will be closed but not be invalidated from connection pool. In this situation, if we obtain a connection from pool, Connection validation failed error will appear, unless all closed connections are invalidated.
This PR makes retry on Connection validation failed exception up to maximum of max size of connections.
See https://github.com/r2dbc/r2dbc-pool/issues/209 for more.
New Public APIs
None
Additional context
See https://github.com/r2dbc/r2dbc-pool/issues/209#issuecomment-2883317917 for more.
r2dbc is dead?
Most likely - yes: https://github.com/r2dbc/r2dbc-pool/issues/211#issuecomment-2602539989
Another reason is that virtual threads + traditional JDBC, in most cases, do the same (with proper bridging to reactive interfaces, including resultset streaming). This is broadcast from many sources and conferences.
IMHO, the real case where R2DBC is still competitive is connection utilization when you don't have a transaction, and a physical connection can be reused for different queries. When you have a transaction, I see no benefit in connection utilization for R2DBC.
Please, prove that I am wrong... but given the current state, when most critical bugs were unattended (and a very complex subject), few to no chances to survive.
r2dbc is dead?
Please, prove that I am wrong... but given the current state, when most critical bugs were unattended (and a very complex subject), few to no chances to survive.
Yes. No. I don't know. I do not want let it become dormant 🤕 however, me being the sole maintainer (alone) and being busy with other things, I don't have the time nor the mental capacity to dive deep into each issue.
See https://github.com/r2dbc/r2dbc-mssql/issues/279#issuecomment-2373591018
Part of the reality is that since 2018, no one showed up that would want to contribute to these projects on a regular basis and would want to become a co-maintainer. I think that fact speaks for itself.
@mp911de
I deeply regret this, and I fully understand your feelings and situation. The reason I asked about the current status of the project is that we have a project with 35k stars and many users that depend on it, so it's important for us to know how things are progressing.
Thank you very much for your contributions to r2dbc. We are also sorry that we do not have much ability to contribute to this project ourselves.