[storm] questions around "could not serialize access due to concurrent update"

Martin DeMello martindemello at gmail.com
Tue Feb 24 09:57:03 GMT 2009


I'm using storm, with psycopg2, for a mildly complicated application
(two processes, each of which have 2-3 threads running at a time), and
I'm getting several instances of the following:

> TransactionRollbackError: could not serialize access due to concurrent update

I'm new to storm (and newish to db programming in general), and the
docs don't have much to say about this. Several questions:

- Is it a sign of a design or programming flaw in my code, or
something to be expected when two processes are trying to access the
same db objects?
- How would I go about identifying what I'm doing wrong and debugging it?
- Can I have storm log which rows exactly are triggering the error?
- Is there a recommended design pattern to mitigate this?
- Is it enough to wrap problematic commits in a block that retries
them until they succeed?
- Any general advice on writing code that accesses the same db tables
from multiple processes?

martin



More information about the storm mailing list