docker-offlineimap/offlineimap/folder
Nicolas Sebrecht 038a433f69 backport: 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 object 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 databases.

Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-26 02:00:17 +02:00
..
__init__.py Use "from . import" for relative imports 2012-02-06 17:41:43 +01:00
Base.py Keywords: avoid warning at each message when no keywords are used 2015-11-22 20:05:34 +01:00
Gmail.py fix: broken retry loop would break connection management 2015-11-26 17:11:59 +01:00
GmailMaildir.py maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option 2015-04-07 11:54:35 +02:00
IMAP.py fix: broken retry loop would break connection management 2015-11-26 17:11:59 +01:00
LocalStatus.py sqlite: open database when we use it rather than at instantiation time 2016-06-08 01:59:39 +02:00
LocalStatusSQLite.py backport: sqlite: properly serialize operations on the databases 2016-07-26 02:00:17 +02:00
Maildir.py Identify and fix messages with FMD5 inconsistencies 2016-03-06 21:01:51 +01:00
UIDMaps.py maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option 2015-04-07 11:54:35 +02:00