cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: using database generated PK
Date Mon, 07 Dec 2015 06:46:10 GMT
I think we can fix CAY-2040 by ensuring a separate transaction (maybe in a separate thread)
for filling the app PK cache. The more I think about it, the more sense it makes. It is really
separate from the main tx.


> On Dec 4, 2015, at 12:45 PM, Aristedes Maniatis <> wrote:
> On 3/12/2015 2:08pm, John Huss wrote:
>> The main advantage of a native solution is that you know it works.  If you
>> ever used native PK generation the AUTO_PK_SUPPORT table feels very
>> kludgy.  It works (I guess?), but it's not ideal.  A native solution is
>> faster and simpler.  It handles transactions better.  Most DBs (all?) do PK
>> generation outside of transactions, so incrementing the sequence always
>> persists regardless of transaction rollbacks or commits.
> Thanks for your detailed reply. Transactions (this bug)
 are exactly why we want to change. Perhaps this is not really a bug, but just a documented
reason not to use this approach and limitation that would be very hard to work around.
> Ari
> -- 
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

View raw message