psycopgda reconnection and conflict handling
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Stuart Bishop |
Bug Description
When an unserializable transaction exception occurs, Z3 should raise a ReadConflict so Z3 automatically retries the request. When an psycopg.
Steve Alexander wrote:
> 2005-01-13 Federico Di Gregorio <email address hidden>
>
> * ZPsycopgDA/db.py (DB.query): applied patch from Jonathan
> Stoneman to automatically try to reconnect *once* on
> OperationalError. This fix the problem with Zope loosing the
> connection to the database when PostgreSQL is restarted.
>
> http://
>
> I think this is the version in breezy.
>
> Also, Mark reported some IntegrityErrors being changed to
> ProgrammingErrors in the psycopg in breezy.
This is the Zope2 DA, not the Zope3 one btw.
We should do something similar upstream in the Z3 DA, as well as raising the
relevant conflict exceptions when a deadlock or unserializable transaction
is encountered to make Z3 retry the transaction.
Changed in launchpad: | |
status: | Unconfirmed → Confirmed |
Changed in launchpad: | |
assignee: | nobody → stub |
Changed in launchpad: | |
status: | Confirmed → Fix Committed |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
With the new session machinery in place, this is now much more important; despite the techniques we are using to avoid concurrent updates, they still happen occasionally.