[jdbc-v2] Set default ports, parse multiple endpoints #2488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Default port
Client
endpoint URLs need to have a port set (see Client). TheJdbcConfiguration
will use the default ports depending onssl
parameter / http(s) prefix.Multiple endpoints in JDBC URL
I know that only one endpoint will currently be used, and there is an ongoing discussion in #1870 whether we want to make it the driver's responsibility to maintain liveness states, distribute calls, keep a pool of connections etc. But the current documentation explains that it is possible to give multiple endpoints. Without this PR this would lead to broken connection. With this PR it is more likely that a successful connection can be established. Alternatively "fix" documentation and throw
SQLException
right away when we detect multiple endpoints in JDBC URL. This would make everything easier 😄 . See #2489 which is an alternative to this PR.Checklist