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] Commented: (DERBY-2432) Unimplemented transaction time out for XA transactions may cause that locks will not be released when client terminates outside a unit of work.
Date Wed, 13 Jun 2007 12:33:27 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504215
] 

Knut Anders Hatlen commented on DERBY-2432:
-------------------------------------------

Thanks Julo, your answers make sense.

A couple of more questions:

Is it specified anywhere what the transaction timeout means? I found a
description in the javadoc for XAResource.setTransactionTimeout(), but
it doesn't say anything about the effect of the timeout.

The property is called derby.jdbc.xaTransactionTimeout. Is it related
to JDBC, or should we call it something else, like
derby.xa.transactionTimeout?

Perhaps EmbedXAResource.start() could have a comment explaining why it
checks (timeoutSeconds != Integer.MAX_VALUE).

I'm not sure I quite understand what the test does. For instance, it's
not clear to me which statements/transactions should time out and what
makes them time out. Also, would it be possible to split the test into
smaller/simpler test cases, like (a) set transaction timeout, (b)
start transaction, (c) sleep for a while, (d) check that the
transaction was aborted?

In the test, the variables xaConn, xaRes and conn are declared and
initialized right before the for loop, but also at the beginning of
the body of the for loop, so their initial values are always thrown
away. Could the variable declarations be moved inside the for loop
instead?

In this try/catch in the test, shouldn't there have been a call to
fail() after xaRes.end()?
+                try {
+                xaRes.end(xid, XAResource.TMFAIL);
+                } catch (XAException ex) {
+                    if (ex.errorCode < XAException.XA_RBBASE
+                        || ex.errorCode > XAException.XA_RBEND)
+                    {
+                        throw ex;
+                    }
+                }

I'm also not sure I understand the following code
+            } else {
+                // check the timout for associated transactions
+                ;
+            }
It says it checks the timeout, but it doesn't do anything.

> Unimplemented transaction time out for XA transactions may cause that locks will not
be released when client terminates outside a unit of work.
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2432
>                 URL: https://issues.apache.org/jira/browse/DERBY-2432
>             Project: Derby
>          Issue Type: New Feature
>          Components: JDBC
>            Reporter: Julius Stroffek
>            Assignee: Julius Stroffek
>             Fix For: 10.3.0.0
>
>         Attachments: d2432.diff, d2432.stat, d2432_v2.diff, d2432_v2.stat, description.txt
>
>
> The XAResource interface provides function setTransactionTimeout which is currently not
supported in derby.
> When client application uses client driver to connect to derby database and the application
crashes outside the unit of work of XA transaction and the transaction is not committed or
rolled back yet the locks held by the transaction will not be released.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message