DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-680
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Andrew Baxter
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

Commits fail due to incorrect transaction id

Created: 15/Mar/11 10:52 PM   Updated: 01/Apr/11 03:24 PM   Resolved: 17/Mar/11 05:11 PM
Component/s: Transactions
Affects Version/s: 3.0.0.m1, 3.0.0.m2
Fix Version/s: 3.0.0.m3

Datastore: Other

 Description  « Hide
When we include our transaction piece for our custom HBase backend, all queries generate the following on commit:
16:42:11,749 (qtp1659915694-19) ERROR [DataNucleus.Transaction] - Operation commit failed on resource: org.apache.hadoop.hbase.client.transactional.JtaXAResource@6deea96c, error code XAER_NOTA and transaction: [DataNucleus Transaction, ID=Xid=

Andy Jefferson added a comment - 16/Mar/11 07:53 AM
As per the JIRA front page, any issue has to be against released software, and any issue has to have a valid testcase that actually demonstrates something

Andy Jefferson made changes - 16/Mar/11 07:53 AM
Field Original Value New Value
Affects Version/s 3.0.0.m3 [ 11188 ]
Priority Major [ 3 ] Incomplete [ 6 ]
Andrew Baxter added a comment - 16/Mar/11 04:23 PM
Sorry, I also thought there was more to my initial comment. I had posted this patch, although I don't see it now, since I thought the two lines it changed might be faster in this case than a test case:

### Eclipse Workspace Patch 1.0
#P core
Index: src/java/org/datanucleus/transaction/
--- src/java/org/datanucleus/transaction/ (revision 12552)
+++ src/java/org/datanucleus/transaction/ (working copy)
@@ -145,11 +145,11 @@
                         if (!failed)
- resourceManager.commit(xid, true);
+ resourceManager.commit((Xid) key, true);
- resourceManager.rollback(xid);
+ resourceManager.rollback((Xid) key);
                     catch (Throwable e)

This has been required since (before?) m1. I've created a test case but it only fails with our HBase backend, but in any case, I'll try to get more information from the person who asked me to post this.

Andy Jefferson made changes - 17/Mar/11 05:09 PM
Fix Version/s 3.0.0.m3 [ 11188 ]
Affects Version/s 3.0.0.m2 [ 11150 ]
Affects Version/s 3.0.0.m1 [ 11060 ]
Andy Jefferson added a comment - 17/Mar/11 05:11 PM
SVN trunk has the "branches" field changed to have Xid as key-type, and to use the branch Xid in commit/rollback sub-calls.

PS. if developing a custom HBase backend it would be nice to at least know about this, the reasons why to do in isolation, what is the scope of such changes, and whether such changes are going to be contributed back. Contact me in private if you wish

Andy Jefferson made changes - 17/Mar/11 05:11 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Andrew Baxter added a comment - 22/Mar/11 03:37 PM
Yeah, I think that would be reasonable too but unfortunately I am very restricted on what I'm allowed to divulge about this project. I'll see what I can do though, or if any other opportunities to contribute to DN come up.

Andy Jefferson made changes - 01/Apr/11 03:24 PM
Status Resolved [ 5 ] Closed [ 6 ]