db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Stroffek (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 Thu, 14 Jun 2007 22:44:26 GMT

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

Julius Stroffek commented on DERBY-2432:
----------------------------------------

> Will the locks mentioned in the description be released after xa_prepare()?

Unfortunatelly, the would not. However, according the JTA spec after calling prepare resource
manager is allowed to heuristically commit or rollback the transaction. This feature is not
implementedyet in derby - at least I tried this and it does not work and I also have not found
anything in docsnorthe code.

User can use the method XAResource.recover to obtain the list of the prepared transactions
and he can commit/rollback the transactions afterwards even after the application server crash.
This process is also described in JTA spec, so it is possible to write a client application
with some cleanup at the startup.

The alternative to v4 patch approach is not to cancel the timeout task in a call to prepare
function. We can file a JIRA to implement heuristic commit/rollbackof the global transactions
and add the cancellation o ftimeout task to xa_prepare with introduction of this feature.
Having the implementation of the xa transaction timeout feature temporarily rolling back prepared
transactions should not matter because if I would know that my transaction should run 2s and
I would like to give a timeout to that transaction I would choose a much higher value like
10s or so just to besurethat my transaction would finish. The interval between prepare and
commit is expecting to be very short.

What is your opinion on this?

> 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, d2432_v3.diff,
d2432_v3.stat, d2432_v4.diff, d2432_v4.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