Should be easy to implement a transaction retry policy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
New
|
High
|
Unassigned |
Bug Description
Similar to bug 94986 (adding the necessary features to implement database reconnection), Storm should make it easy to implement a transaction retry policy for certain classes of problems.
When this is fixed, it should be easy for an application to detect database errors that indicate serialisation problems that should be retried. For a Zope application, this would involve converting such errors to Retry exceptions in the publisher's handleException() method.
For Launchpad, we currently retry the following exceptions (this is Postgres with psycopg1):
1. any psycopg.
2. any psycopg.Error with a message that starts with one of:
* ERROR: could not serialize access due to concurrent update
* ERROR: deadlock detected
Ideally these exceptions should be marked such that they can easily be identified and handled appropriately.
Changed in storm: | |
importance: | Undecided → High |
I've posted a psycopg2 patch to the mailing list at: thread. gmane.org/ gmane.comp. python. db.psycopg. devel/4384
http://
When it gets applied, the list of errors we want to retry will be limited to just psycopg2. IntegrityError and psycopg2. extensions. TransactionRoll backError.