<div dir="ltr">Thanks for the debugging tips.   I&#39;ll see what that teaches me today.<div><br></div><div>I have no choice but to get to the bottom of this.   We&#39;re trying to update an ancient system that I wrote back in the 1990s (yes, I&#39;m old), which is tied to Sybase, and ironically one of the reasons we&#39;re moving to DBIC first is to enable getting OFF of Sybase.   The strategy was to implement the DBIC ORM model, and then migrate to a more modern RDBMs, but if we can&#39;t get DBIC to work reliably with Sybase, then we&#39;re screwed.   </div>
<div><br></div><div>Sadly, I have no way to get you access to a Sybase database to test on, unless I buy the damn thing myself.   The free versions of Sybase allow so few connections that you almost certainly cant&#39; reproduce this problem, either.    I did some of the testing for you a year ago on the free version, and then had to abandon it when we got things working, and I started running my real test suite against it.  It&#39;s heavily parallelized and without allowing at least 32 connections (the free one gives you 5, IIRC) it just won&#39;t run.   We moved development in house at that point (this was an OSS product no one cares about), and have been working with the supported Enterprise versions of Sybase ever since.     </div>
<div><br></div><div>As for reducing this to a small test case, that&#39;s going to be extremely difficult, since it&#39;s a very large system I&#39;m working with.   If Peter&#39;s debugging hints don&#39;t give me enough clues to get to the bottom of this on my own, that&#39;s the next step.   I&#39;m going to spend all of today digging into this, and if I can&#39;t get somewhere by week&#39;s end, then I&#39;ll try to create something that reproduces it.   </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 5:16 PM, Peter Rabbitson <span dir="ltr">&lt;<a href="mailto:rabbit+dbic@rabbit.us" target="_blank">rabbit+dbic@rabbit.us</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Feb 03, 2014 at 04:34:07PM -0500, Phillip Moore wrote:<br>
&gt;<br>
&gt; I&#39;m starting to see a problem where about 2% of the DBIC objects I create<br>
&gt; come back with a primary key (which is a Sybase identity column) whose<br>
&gt; value has been incremented one too many times.<br>
</div>&gt; ...<br>
<div class="im">&gt; I am working on getting more in depth debugging information, and I am well<br>
&gt; aware that this problem report is lacking in such details, but in the<br>
&gt; meantime do these symptoms sound familiar to anyone at all?<br>
<br>
</div>Yes, the way we talk to Sybase is rather hideous:<br>
<a href="https://metacpan.org/pod/DBIx::Class::Storage::DBI::Sybase::ASE#INSERTS-WITH-PLACEHOLDERS" target="_blank">https://metacpan.org/pod/DBIx::Class::Storage::DBI::Sybase::ASE#INSERTS-WITH-PLACEHOLDERS</a><br>
<br>
Some debug ideas: look at the result of DBIC_TRACE=1 to see if you are<br>
indeed affected by this (a SELECT MAX query being fired). If not the<br>
case - likely something to do with how @@IDENTITY is isolated on your<br>
version of Sybase (likely badly). You could also DBI_TRACE=2=logfile<br>
(note DBI not DBIC) to see what values does DBIC see coming from DBI (to<br>
rule out a DBIC-level problem). Also you could potentially have issues<br>
with retries, though this is much less likely - set<br>
DBIC_STORAGE_RETRY_DEBUG=1 to see those.<br>
<br>
In either case - please please do get to the bottom of this. It looks<br>
like a rather serious problem, I don&#39;t want to leave it unsolved, but at<br>
the same time do not have easy access to a Sybase server (wink wink<br>
nudge nudge ;)<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>
Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
</div></div></blockquote></div><br></div>