-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use native connection checks where possible and with configurable timout #150
Conversation
bdd1c5b
to
078f3ee
Compare
checkConnection
executes with a configurable timeout
checkConnection
executes with a configurable timeoutb4599da
to
9098fbd
Compare
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
Outdated
Show resolved
Hide resolved
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
Show resolved
Hide resolved
9098fbd
to
1fa3459
Compare
UT are all good to go. |
src/main/java/com/feedzai/commons/sql/abstraction/engine/impl/MySqlEngine.java
Outdated
Show resolved
Hide resolved
1fa3459
to
21acb01
Compare
src/main/java/com/feedzai/commons/sql/abstraction/engine/impl/OracleEngine.java
Outdated
Show resolved
Hide resolved
0781e1c
to
7ec396d
Compare
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
Outdated
Show resolved
Hide resolved
7ec396d
to
ddfafbc
Compare
ddfafbc
to
e2f1ca3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
e2f1ca3
to
c6fa3c1
Compare
DB2 using |
e019069
to
c619f44
Compare
src/main/java/com/feedzai/commons/sql/abstraction/engine/impl/DB2Engine.java
Outdated
Show resolved
Hide resolved
6347ce7
to
b2739d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, only minor stuff to check
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
Outdated
Show resolved
Hide resolved
src/test/java/com/feedzai/commons/sql/abstraction/engine/impl/abs/TimeoutsTest.java
Outdated
Show resolved
Hide resolved
b2739d8
to
feecf43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjust the title and summary to what's currently being done
feecf43
to
4db3646
Compare
This commit introduces changes to the verification of the JDBC connections.
When verifying database connections, PDB should do it in a timely manner to allow a faster failover of the database. To achieve this goal, a new property is included to configure the timeout of the verification.
Most of the engines are now using JDBC standard
isValid()
.PostgreSQL, do not respect it and unit tests had failed consistently. (see: pgjdbc/pgjdbc#1943)
DB2 does not correctly recover connections using
isValid()
.