This project is archived and is in readonly mode.

#6651 new
Michael Villar

Thread-safe problem with transactions

Reported by Michael Villar | March 30th, 2011 @ 12:01 PM

I made a simple script to illustrate the problem.

The problem is the script blocks just before "" after a while.
I found out (after a fucking time) that the problem occured because of the BEGIN COMMIT stuff around a UPDATE sql query.
I think, that two projects want to be saved at the same time, and the first query is not commited yet, so there are two BEGIN started.

We should synchronize the transactions through the threads.
I made a terrible fix that I don't like but which works. I don't know ActiveRecord code so I wanted something simple.

Thanks for reading. Hope I'm not wrong.

ActiveRecord 3.0.5

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket