1878 films and counting...

Temporary Signup Problems - Blog


We've resolved a bug that was preventing signups for some potential users.

The bug was a small one, and quick to track down, despite it only happening for some users.

Bug Breakdown

To check if an email address is already in use, we have to iterate every user, as we keep it encrypted at rest.

Whilst iterating, sometimes, depending on the number of active users, the iterator would try and open a database that is currently still updating its contents.

When that happens, instead of bailing or waiting, the iterator would raise an exception, which we hadn't predicted that it could raise (nor had the linters or type checkers).

Bug Fix

Quite simple, we push that particular database to the back of the test, to retry again later.

    db = connect(x.resolve())
except DatabaseError:

Note: This might look like the usually available sqlite3 library from Python. It is not. Just the same API.

This does raise the edgecase about a database being constantly locked - which we had already accounted for.

Continue reading...