cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Duplicate Key Problem
Date Thu, 13 Jul 2006 15:22:30 GMT

On Jul 13, 2006, at 10:57 AM, Gentry, Michael ((Contractor)) wrote:

> Is the PK cache per VM or per DataNode?  I was thinking per DataNode
> (obviously within the same VM, of course).

True, more accurately it is one per DataNode, and is shared by all  
DataContexts that sit on top of a given DataDomain.

> Another thing that could be tricky is that the MySQL JDBC connector
> (Connector/J) has an autoReconnect=true option, which would catch a
> disconnection before Cayenne could see it and reconnect.  Not sure at
> all what would happen to an in-progress transaction if that were the
> case.

Good point. But I am more concerned about runtime exceptions in the  
code that theoretically can cause a PK range to become invalid. One  
straightforward way to fix that is to apply the same approach we did  
for Sybase PK generator per CAY-588 (i.e. ensure that PK is generated  
outside of the main transaction. I guess that's what we'll have to  
do, but I want to have a way to reproduce the problem first, if only  
to know that our fix actually fixes it.


View raw message