[master] errors during cleanup mask underlying errors (eg TooManyConcurrentRequests)

Bug #429747 reported by Martin Pool on 2009-09-14
84
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar
High
Andrew Bennetts

Bug Description

There is a general problem in bzr that errors raised during finalization can mask other more important or illuminating exceptions raised earlier on. See for example <https://bugs.edge.launchpad.net/bzr/+bug/423015>. Also, the errors during cleanup are often (but not always) caused by knock-on effects of the earlier problem, such as the smart medium being broken.

We need to have some way to make the earlier error visible.

Constraints:

 * Errors during cleanup should not be lost: if they indicate something has really gone that should be visible to the user, to tests, and to API users. (Consider a bug causing an UnboundLocalError during cleanup.)

 * Code that runs a cleanup through a try/finally block should not be overly complicated.

I propose to make all code likely to be called at cleanup (unlock, abort_write_group, etc) go through a common higher-order-function that can define policy for errors within them, then add a -Dcleanup that will turn those errors into warnings, thereby allowing the earlier error to continue. This shouldn't make anything worse, and it will give a way to at least see what the earlier error was without needing to change the source.

Related branches

Robert Collins (lifeless) wrote :

Sounds fine to me

Andrew Bennetts (spiv) on 2009-09-22
Changed in bzr:
assignee: Martin Pool (mbp) → Andrew Bennetts (spiv)
Andrew Bennetts (spiv) on 2009-09-24
Changed in bzr:
status: Confirmed → In Progress
Martin Pool (mbp) on 2009-10-06
summary: - errors during cleanup mask underlying errors
+ errors during cleanup mask underlying errors (eg
+ TooManyConcurrentRequests)
summary: - errors during cleanup mask underlying errors (eg
+ [master] errors during cleanup mask underlying errors (eg
TooManyConcurrentRequests)
John A Meinel (jameinel) on 2009-10-14
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.1.0b1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers