[storm] No exception raised when hitting database locking error
Steve Kieu
msh.computing at gmail.com
Thu Dec 16 07:25:17 GMT 2010
Hello all,
It is kind of hard to explain - basically I wrote an application that
trying to retrieve a set of objects from the db - then opening a config file
and loop over the lines regex matching and if match, update a field from the
object. At the end of function - call store.commit()
Run it at the same time in multiple servers to connect to one central
database (tested with postgre and mysql). The set of object mentioned above
are a different set (as they run in different servers)
If I use postgres and I often get error - the program quit with an error: could
not serialize access due to *concurrent update*I tried to wrap
store.commit() in try and except but it never runs into except: it just
passed the store.commit() as normal and exited.
The same problem with MySQL with innoDB (different error message though,
something abt deadlock detected
What surprises me is that why the db server refuses to work. I am positive
that they are completely different set and then it should be in different
rows modifications.
And then storm does not throw exception on this case so I can catch using
except and try again or do something about it.
The problem is fixed if: I call store.commit() after each object value
update (store.flush() is not enough) ; but it is painfully slow
MyISAM does not have that problem as well
--
Steve Kieu
Ph: +61-7-3367-3241
sip:*01161428 at sipbroker.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20101216/b0381204/attachment.htm
More information about the storm
mailing list