surinder-insonix / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

Please provide actionable information when txn fails to commit. #209

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The logged excerpt below is by far the most obscure yet critical log entry I 
have encountered.  Neither the ERROR logged by 
org.datanucleus.transaction.Transaction nor the thrown jdo.JDOException contain 
any information besides stating that the transaction failed to commit. 

Please provide some kind of actionable hint as to why the transaction failed to 
commit. 

-------------------------
What steps will reproduce the problem?

 Nearly any database issue with cause this exception to be thrown.

What is the expected output? 

What do you see instead?

06-07 04:28PM 27.868
org.datanucleus.transaction.Transaction commit: Operation commit failed on 
resource: org.datanucleus.store.appengine.DatastoreXAResource@1c82121, error 
code UNKNOWN and transaction: [DataNucleus Transaction, ID=Xid=
W 06-07 04:28PM 27.870
caught jdo.JDODataStoreException message="Transaction rolled back due to 
failure during commit"

What version of the product are you using? On what operating system?
1.3.4 using Java 1.6 and JDO 

Please provide any additional information below.

Original issue reported on code.google.com by andy.stevko on 7 Jun 2010 at 11:50

GoogleCodeExporter commented 8 years ago
I"m having exactly the same problem with  Java 1.6, JDO on Mac OS X with App 
Engine 1.3.4
Did the problem ever get resolved?

It's quite critical on my side

Original comment by killian....@gmail.com on 2 Jul 2010 at 3:43

GoogleCodeExporter commented 8 years ago
I have the same problem with 1.3.8 and Java 1.6

Original comment by strea...@gmail.com on 30 Nov 2010 at 9:24

GoogleCodeExporter commented 8 years ago
I would say that logging of database transaction failures is much better than 
when I originally submitted this ticket.
Most transaction commit failures I've encountered in recent history have been 
due to either Concurrent Modification or COMMIT WRITE TIMEOUT.

The secret to decoding this error is to look at the nested exception like:
NestedThrowablesStackTrace:
java.sql.SQLException: Concurrent Modification
    at org.datanucleus.store.appengine.DatastoreTransaction.commit(DatastoreTransaction.java:70)

To be bulletproof, it is critical to 
catch javax.jdo.JDOException, JDOCanRetryException, and others
in order to recover the pertinent information and act on it intelligently.

Original comment by andy.stevko on 30 Nov 2010 at 7:24

GoogleCodeExporter commented 8 years ago
Can somebody who had this problem please define what is the current status, and 
if something is still missing then define a simple testcase that shows it

Original comment by googleco...@yahoo.co.uk on 9 Aug 2011 at 11:04

GoogleCodeExporter commented 8 years ago
Can't reproduce anything here. Provide a test that demonstrates something being 
inadequate then it could be taken forward

Original comment by googleco...@yahoo.co.uk on 1 Nov 2011 at 10:31

GoogleCodeExporter commented 8 years ago
I once in a while get an error log:

org.datanucleus.transaction.Transaction commit: Operation commit failed on 
resource: org.datanucleus.store.appengine.DatastoreXAResource@1d374be, error 
code UNKNOWN and transaction: [DataNucleus Transaction, ID=Xid=

While it appears to be truncated it is really all there is. No stack trace, no 
nested exception, no exception received by my code. So I wonder whether this 
error just occurs internally and some automatic retry of the transaction 
succeeded. 

Original comment by gpaul.pe...@googlemail.com on 24 Oct 2012 at 7:26

GoogleCodeExporter commented 8 years ago
appengine 1.8.0
DN 3.1.1
apengine DN 2.1.1

i am still getting the same error 

org.datanucleus.transaction.Transaction commit: Operation commit failed on 
resource: com.google.appengine.datanucleus.DatastoreXAResource@d03877, error 
code UNKNOWN and transaction: [DataNucleus Transaction, ID=Xid=

i cant write a test case because it occurs occasionally and for obvious reason.

Original comment by lu...@asteriski.com on 6 May 2013 at 11:38