db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6167) Interrupt restarts clock for login timeout
Date Thu, 04 Jul 2013 12:03:48 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-6167:
--------------------------------------

    Attachment: InterruptDuringConnect.java

Attaching a repro for the bug. The repro connects twice to a database with login timeout set
to 10 seconds. An authenticator that blocks forever is installed, so that both attempts will
have to give up and time out. The second connection attempt is interrupted after 8 seconds,
and that makes it take 18 seconds to time out, rather than the expected 10 seconds.

Output from a test run:

failed to get connection: java.sql.SQLTimeoutException: Login timeout exceeded.
getConnection took 10257 ms
failed to get connection: java.sql.SQLTimeoutException: Login timeout exceeded.
getConnection took 18001 ms
                
> Interrupt restarts clock for login timeout
> ------------------------------------------
>
>                 Key: DERBY-6167
>                 URL: https://issues.apache.org/jira/browse/DERBY-6167
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.10.1.1
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_11
>         Attachments: InterruptDuringConnect.java
>
>
> If a login takes time, and the thread that's blocked in Driver20.timeLogin() is interrupted,
it will call Future.get() again with the same timeout value. This means that interrupting
a getConnection() call will not make it terminate faster, as one might expect. Instead, it
restarts the timeout clock and makes it terminate later than if it had not been interrupted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message