[Dbix-class] Strange statistically significant failure for DBIC with Sybase

Ben Tilly btilly at gmail.com
Mon Feb 3 22:05:04 GMT 2014


If you have a reproducible 2% failure rate, can you come up with a simple
reproducible test case?

I'm talking something of the form, "Start with an empty Sybase database,
create these tables, run this script to add sample data, run this
migration, run this test, and voila!"

Something to let someone else reproduce the problem without your full
environment.


On Mon, Feb 3, 2014 at 1:34 PM, Phillip Moore <w.phillip.moore at gmail.com>wrote:

> I'm working with a very large, and very old software product, and trying
> to convert it'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 "huge" by modern standards).
>
> I'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.
>
> The 2% failure rate is reproducible, but when I convert the entire legacy
> database to the new schema, it'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.
>
> I'm using DBIC 0.08250 with DBD-Sybase 1.14 (both are a tad out of date;
> I've requested upgrades, which sadly I no longer control) against a Sybase
> ASE 12.5.4 server.
>
> 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?
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20140203/717c3a7c/attachment.htm>


More information about the DBIx-Class mailing list