Code review comment for lp://staging/~jtv/launchpad/bug-410293

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

= Bug 410293 =

This branch is meant for cherry-picking. Its fix may be crucial for the
Karmic translation process.

The translations importer mails out notifications about imports it has
processed. Recently this has been failing a lot with assertion failures
about the outgoing email having no "To" address.

To some extent the importer is prepared for this. It sends the email in
a separate transaction, ensuring that the offending file is fully
processed before the failure happens and won't be the same spanner in
the works on the next run.

On the other hand, an assertion failure does stop the script, halting
all imports until the next script run up to 10 minutes later. We've
been seeing a terrible slowdown over the past two days, roughly from
2009-01-01 15:00 to 2009-09-02 23:00 (times may be BST or UTC; we're not
quite sure). After that things got going again of their own volition,
but a two-hour relapse shows that we are still not safe.

Here you see a simple fix: only send out emails if there are email
addresses to send the email to. It is not guaranteed that a user will
have a valid email address at any given time after registration.

An added test attempts to import a malformed file imported by a user
without valid email address. The importer notes the error but has no
email address to notify. Without the fix it aborts as in production;
with the fix it completes normally. (Of course the malformed file still
fails to import).

Jeroen

« Back to merge proposal