[Koha-devel] Issues with DBIx and nested transactions

Tomas Cohen Arazi tomascohen at gmail.com
Thu Jun 4 19:13:24 CEST 2015


I've just pushed bug 13967 [1]. It introduces a new package
(Koha::Config::SysPrefs) that heavily relies on DBIx::Class to deal with
the required CRUD for system preferences.

It should be no surprise that the first widespread use of DBIx on Koha's
codebase raises problems. Widespread means every call to anything is using
it :-D.

The point: it noticeably broke lots of our t/db_dependent/ tests. A first
guess would point to the package itself. But such doesn't seem to be the
case. It is highlighting an underlaying problem in how we deal with the DB:
the errors are related to nested transactions taking place, so I would
point to our (abuse?) of $dbh->{AutoCommit} = 0 on the tests.

Actually, if you pick any db_dependent test that is currently failing on
master and set the AutoCommit = 1 you will notice the tests work as
expected (with the side effect of altering the DB of course).

So, this is a call for all of you, whenever you find some time, to try to
figure what's going on and possible solutions to this. I ain't no DBIx
expert and will be doing my best but really need your help.

Before someone says it: reverting the commits will put us back to the
previous state, of course. But it will just hide the problem for a while.

[1] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13967

-- 
Tomás Cohen Arazi
Prosecretaría de Informática
Universidad Nacional de Córdoba
✆ +54 351 5353750 ext 13168
GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20150604/8340b5ad/attachment.html>


More information about the Koha-devel mailing list