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

Bug #429747 reported by Martin Pool
84
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
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

Revision history for this message
Robert Collins (lifeless) wrote :

Sounds fine to me

Andrew Bennetts (spiv)
Changed in bzr:
assignee: Martin Pool (mbp) → Andrew Bennetts (spiv)
Andrew Bennetts (spiv)
Changed in bzr:
status: Confirmed → In Progress
Martin Pool (mbp)
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)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.