<div dir="ltr">I&#39;m working with a very large, and very old software product, and trying to convert it&#39;s ancient Sybase tables to modern, normalized forms with a DBIC API to access it.   Things have been going well, until I started parallelizing the data conversion, and hitting the database a little hard (up to 16 processes at a time -- hardly &quot;huge&quot; by modern standards).<div>
<br></div><div>I&#39;m starting to see a problem where about 2% of the DBIC objects I create come back with a primary key (which is a Sybase identity column) whose value has been incremented one too many times.   Then, when I create related objects and assign that identity value as a foreign key, the relationships are essentially corrupted.  Things get associated with the wrong object.</div>
<div><br></div><div>The 2% failure rate is reproducible, but when I convert the entire legacy database to the new schema, it&#39;s a different, seemingly random subset of objects that get returned this way.  I figured out what was happening by noticing the off by one error, and then sanity checking the metadata for id-1 and finding THAT to be correct.</div>
<div><br></div><div>I&#39;m using DBIC 0.08250 with DBD-Sybase 1.14 (both are a tad out of date; I&#39;ve requested upgrades, which sadly I no longer control) against a Sybase ASE 12.5.4 server.</div><div><br></div><div>I am working on getting more in depth debugging information, and I am well aware that this problem report is lacking in such details, but in the meantime do these symptoms sound familiar to anyone at all?   </div>
</div>