docker-offlineimap/offlineimap/folder
Nicolas Sebrecht 3c42913120 sqlite: properly serialize operations on the databases
1. There is one database per folder and sqlite requires to serialize the
writings. Instead of locking at LocalStatusSQLiteFolder instance level,
introduce a new DatabaseFileLock object which is shared across threads. This
fixes the concurrent writes issues that some users might experience by
duplications or flags restored to the previous state.

2. Close the database only when we are sure no other threads will use the
connection on a *per-file* basis. Previous fix 677afb8d8f is wrong
because the same lock is shared for all the database files.

Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-26 01:57:25 +02:00
..
__init__.py IMAP/IMAP: fix import issue about UIDMaps 2016-07-25 05:26:57 +02:00
Base.py remove dead code: the description of the passes is never used 2016-07-18 18:41:41 +02:00
Gmail.py remove dead code: the description of the passes is never used 2016-07-18 18:41:41 +02:00
GmailMaildir.py fix attribute name _utime_from_header 2016-07-16 21:25:14 +02:00
IMAP.py learn to not download UIDs defined by the user 2016-07-03 20:02:45 +02:00
LocalStatus.py local status: deletemessagelist: remove broken code 2016-07-25 15:06:39 +02:00
LocalStatusSQLite.py sqlite: properly serialize operations on the databases 2016-07-26 01:57:25 +02:00
Maildir.py Maildir: OfflineImapError is missing the severity argument 2016-07-16 18:02:01 +02:00
UIDMaps.py UIDMaps: correctly protect from concurrent writes 2016-07-03 20:00:21 +02:00