You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2014/08/01 18:59:39 UTC
[jira] [Commented] (DERBY-5165) Prepared XA transaction locks are
not kept across DB restart
[ https://issues.apache.org/jira/browse/DERBY-5165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14082500#comment-14082500 ]
Myrna van Lunteren commented on DERBY-5165:
-------------------------------------------
I thought I'd try to make a junit test case based on Knut's java program.
However, I am stuck because of the unfinished xar.prepare...
The test case shows the problem occurs by doing a xar.prepare *after* an xar.end.
If I use this test case in a defaultSuite, it will try to exercise the test case twice, and the second time it will fail with an XAER_DUPID (for the client-server iteration).
I am assuming that this will also/possibly interfere with any subsequent tests.
How do I correctly stop this XA Resource? As it's already xar.end-ed?
I tried:
xa.rollback: gave me an arrayindexoutofboundsException
xar.forget, xar.commit, or xar.end returned an XAException (complaining that a transaction is still active. If I catch this and ignore, it again returns XAER_DUPID for the client-server test)
> Prepared XA transaction locks are not kept across DB restart
> ------------------------------------------------------------
>
> Key: DERBY-5165
> URL: https://issues.apache.org/jira/browse/DERBY-5165
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.6.2.1
> Environment: Mac OSX
> Reporter: Guy Pardon
> Assignee: Mike Matrigali
> Labels: derby_triage10_11
> Attachments: Derby5165.java
>
>
> Steps to reproduce:
> 1-perform update with XA, using, say Xid xid1
> 2-prepare xid1 with XA but do NOT commit
> 3-restart Derby DB
> 4-the updates of step 1 will be visible
> When xid1 is rolled back after step 3 then the updates are gone. So my conclusion is that the transaction is not committed yet, but the updates are visible after prepare. This is a violation of the XA semantics.
--
This message was sent by Atlassian JIRA
(v6.2#6252)