You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that #71 does not help at all, because both the prune loop and new_email request handler are writers, and WAL only helps to avoid readers locking writers.
Here write connection is created and transaction is started immediately:
mailadm/src/mailadm/commands.py
Line 63 in 09f6f2a
This command is called by prune loop every second.
Opening a transaction locks the database in such a way that
new_email
will not be able to get a transaction here and timeout:mailadm/src/mailadm/web.py
Line 27 in 09f6f2a
Transaction should be short-lived. At the very least
begin immediate
should be replaced withbegin
here:mailadm/src/mailadm/db.py
Line 44 in 09f6f2a
This will postpone locking the database until the first write statement: https://www.sqlite.org/lang_transaction.html
But I don't see the reason to explicitly open transactions in the prune loop at all, it's enough to open a write connection without a transaction.
The text was updated successfully, but these errors were encountered: