cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gentry, Michael \(Contractor\)" <>
Subject RE: Duplicate Key Problem
Date Fri, 21 Jul 2006 14:14:19 GMT
I was never able to reproduce the problem, either.  I have version
4.0.12 of MySQL.  I think autoReconnect=false is a good thing to try,
since Cayenne will catch connection exceptions and try to reconnect on
its own.



-----Original Message-----
From: Christian Mittendorf [] 
Sent: Friday, July 21, 2006 9:56 AM
Subject: Re: Duplicate Key Problem

Am 13.07.2006 um 20:35 schrieb Andrus Adamchik:

> BTW, I tried to reproduce PK generator getting an incorrect PK  
> range on MySQL by emulating some load via JMeter. It never happens  
> (at least on a single VM instance). I wrote a test case that throws  
> an exception randomly on committing the user transaction. Still the  
> application was able to recover from failed transactions and carry  
> on processing other requests.

May it be that the version of MySQL has some affects on what we  
experience? We are currently using 5.0.18.

> I am curious what Michael finds in his tests.

Me too, are there any results available?

> Anyways, I went ahead and added an explicit commit to the PK  
> generator (that code, although I couldn't make it fail, still  
> looked suspect) and posted new jars here:
> Christian, I would appreciate if you could try this in your  
> application and see if you still get those errors.

We will update some applications in the next week, we haven't found  
the time to do so this week.

But there was some other idea we had discussed recently. At the  
moment all of our apps use the "autoReconnect=true" feature of the  
jdbc driver and after some discussions with colleagues we updated the  
config to use "autoReconnect=false". If our problem is related to  
MySQL loosing the connection I would expect to get some kind of "Lost  
connection" errors instead of duplicate key messages.


View raw message