[storm] No exception raised when hitting database locking error

Steve Kieu msh.computing at gmail.com
Sat Dec 18 01:00:15 GMT 2010


>
>
> It isn't unusual for serialisation errors to be reported prior to
> commit: the database usually reports them as soon as it detects the
> problem.  The traceback from the error you saw probably tells you
> where it occurred.  Try wrapping your try/except block around the
> entire transaction logic rather than just the commit() call.
>
>
Yes that would be good explanation - but if I wrap the whole transaction
(which I will test next week) then if failed I have to abort many updates
and have to do all again. Which is I guess another terribly slow.

given that they update different sets of objects and there is no insert
 during these times from any of the server - the db server refuses with
transaction serialization error is still unexpected to me.

Thanks a lot,




> If you're using PostgreSQL, the
> psycopg2.extensions.TransactionRollbackError exception should cover
> the cases you're interested in.
>
>
> > The same problem with MySQL with innoDB (different error message though,
> > something abt deadlock detected
>
> I would guess MySQL is pretty much the same: report the error as soon
> as the problem is detected rather than letting you continue until
> commit.
>
>
> > 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
>
> Well MyISAM doesn't support transactions, so you shouldn't expect it
> to report transaction serialisation errors ...
>
> James.
>



-- 
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/20101218/2cca641b/attachment.htm 


More information about the storm mailing list