[CONJ-649] datasource connectTimeout URL parameter is not honoured Created: 2018-09-27 Updated: 2019-02-08 Resolved: 2018-12-21 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | configuration |
| Affects Version/s: | 2.3.0, 2.2.3 |
| Fix Version/s: | 1.8.0, 2.4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Brendon Abbott | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Java 8 |
||
| Description |
|
Configuring the MariaDbDataSource using a URL, the connectTimeout parameter is no longer honoured. The inbuilt default appears to be using. We configure the connectTimeout to be short, as we are using the JDBC library from within a monitoring application, that requires a non typical, short connectTimeout.
This appears to have been introduced around commit fde60c15d2aa6d283474ce0c31c24b88a2e78a55 |
| Comments |
| Comment by Brendon Abbott [ 2018-09-27 ] | |
|
I did have an attempt to fix, but realised the effect might be far reaching in terms of resilience models, and pooling - so thought best not to! In MariaDbDataSource.initialize, it feels like line 515 is incorrect behaviour. Unlilke user/password/database it is given a default value in the class. Therefore it is not possible to determine if the client has supplied a value. I tried to put a line after 517, the parsing and only set the default in the UrlParser.Options if it hadn't been read in - however I then discovered the code in Options where it checks Driver Manager
|