Issue Details (XML | Word | Printable)

Key: JDBC-589
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

Add support for setNetworkTimeout/getNetworkTimeout()

Created: 06/Jul/19 12:42 PM   Updated: 19/Jan/20 04:58 PM
Component/s: JDBC driver
Affects Version/s: None
Fix Version/s: Jaybird 4.0.0-beta-2, Jaybird 4

 Description  « Hide
Add support for JDBC 4.1 setNetworkTimeout()/getNetworkTimeout().

Initial implementation will only set the SO_TIMEOUT of the socket.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 06/Jul/19 03:36 PM - edited
Implemented basic timeout support locally, but due to the way errors are handled and the connection close is handled, this causes a timeout amplification of +/- 4-5x as the exception during timeout causes a connection close, which will try to cleanly end the connection, which causes a commit which times out, which causes a rollback, which times out and then a connection close, which times out.

This may need to be revised further to force an abrupt connection close by forcing the socket to close, however in the current implementation that is not easy to achieve.

Mark Rotteveel added a comment - 13/Jul/19 11:45 AM
Made some improvements to forcibly close a connection, which removes the timeout amplification.