I am currently experiencing concurrency issues after moving from MySQL
My original program worked fined using MySQL but is now returning
"SQLite3::BusyException" errors. The same result happens whether or
not I enable the allow_concurrency flag.
If I do manually acquire a lock on the SQLite DB the problem would
disapear, but I thought that rails was supposed to handle this
internally (optimistic locking?)
For example the following code (shortened for clarity purposes) caused
no exception with MySQL but would not run with SQLite. Is this a rails
issue or is it simply normal behavior?
----- lib/person_updator.rb -----
ActiveRecord::Base.allow_concurrency = true
p1 = Person.find_by_id(1)
p2 = Person.find_by_id(2)
t = Thread.start do
p1.name = "Michael"
p2.name = "Joe"