Merge lp://staging/~allenap/launchpad/oneiric-librarian-bug-871596 into lp://staging/launchpad

Proposed by Gavin Panella
Status: Rejected
Rejected by: Gavin Panella
Proposed branch: lp://staging/~allenap/launchpad/oneiric-librarian-bug-871596
Merge into: lp://staging/launchpad
Diff against target: 56 lines (+18/-8)
1 file modified
lib/lp/services/database/__init__.py (+18/-8)
To merge this branch: bzr merge lp://staging/~allenap/launchpad/oneiric-librarian-bug-871596
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Disapprove
Launchpad code reviewers Pending
Review via email: mp+79175@code.staging.launchpad.net

Description of the change

It seems that disconnection errors behave slightly differently on Oneiric... possibly. This branch intercepts pgcode 57P01 - admin_shutdown - and allows transactions to be retried instead of just breaking at the first opportunity. Doing this lets the example test command given in the bug to complete without failure.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Rather than fix this in every system, we should just fix it once in Storm. Storm catches the PostgreSQL exceptions, puts its stores in a state so they will attempt to reconnect, and raises DisconnectionError. In particular, I don't think the proposed patch works as the Storm store is being left in an inconsistent state (the next request will likely fail, and the subsequent one might reconnect).

I think this might also be the issue Garry saw with making the appserver return 503 errors when the database was unavailable.

review: Disapprove

Unmerged revisions

14139. By Gavin Panella

Use pgcode instead of string matching.

14138. By Gavin Panella

Treat unexpected disconnections from the database as a possible transient error.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.