[jboss-jira] [JBoss JIRA] (WFLY-6050) Query timeout (set-tx-query-timeout) not applied within last second before transaction timeout
Piotr Findeisen (JIRA)
issues at jboss.org
Fri Jan 22 10:41:00 EST 2016
[ https://issues.jboss.org/browse/WFLY-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Piotr Findeisen updated WFLY-6050:
----------------------------------
Description:
When using {{<set-tx-query-timeout>true</set-tx-query-timeout}}, the query timeout is applied, unless less than 1 second remains until transaction timeout.
This is due to a typo in code converting transaction timeout (millis) into jdbc timeout (seconds).
Widlfy 9.0.2 uses IronJacama 1.2.5, so here's the code (https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.2.5.Final/adapters/src/main/java/org/jboss/jca/adapters/jdbc/WrapperDataSource.java#L207):
{code}
long result = timeout / 1000;
if ((result % 1000) != 0) // <------ the `timeout % 1000` was supposed to be
++result;
{code}
was:
When using {{<set-tx-query-timeout>true</set-tx-query-timeout}}, the query timeout is applied, unless less than 1 second remains until transaction timeout.
This is due to a typo in code converting transaction timeout (millis) into jdbc timeout (seconds).
Widlfy 9.0.2 uses IronJacama 1.2.5, so here's the code (https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.2.5.Final/adapters/src/main/java/org/jboss/jca/adapters/jdbc/WrapperDataSource.java#L206):
{code}
long result = timeout / 1000;
if ((result % 1000) != 0) // <------ the `timeout % 1000` was supposed to be
++result;
{code}
> Query timeout (set-tx-query-timeout) not applied within last second before transaction timeout
> ----------------------------------------------------------------------------------------------
>
> Key: WFLY-6050
> URL: https://issues.jboss.org/browse/WFLY-6050
> Project: WildFly
> Issue Type: Bug
> Components: JCA
> Affects Versions: 9.0.2.Final
> Reporter: Piotr Findeisen
> Assignee: Jesper Pedersen
>
> When using {{<set-tx-query-timeout>true</set-tx-query-timeout}}, the query timeout is applied, unless less than 1 second remains until transaction timeout.
> This is due to a typo in code converting transaction timeout (millis) into jdbc timeout (seconds).
> Widlfy 9.0.2 uses IronJacama 1.2.5, so here's the code (https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.2.5.Final/adapters/src/main/java/org/jboss/jca/adapters/jdbc/WrapperDataSource.java#L207):
> {code}
> long result = timeout / 1000;
> if ((result % 1000) != 0) // <------ the `timeout % 1000` was supposed to be
> ++result;
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list