docker-offlineimap/offlineimap/repository
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 correctly reraise errors with six 2016-07-03 19:56:14 +02:00
Base.py avoid removing of data when user removed a maildir 2016-06-26 17:00:23 +02:00
Gmail.py do use the XOAUTH2 url if configured 2015-10-12 07:51:05 +02:00
GmailMaildir.py repository: GmailMaildir: fix copyright 2015-01-14 18:01:05 +01:00
IMAP.py fix: configparser does not know about python types like u"" 2016-07-13 14:02:25 +02:00
LocalStatus.py sqlite: properly serialize operations on the databases 2016-07-26 01:57:25 +02:00
Maildir.py minor code cleanups 2016-06-08 19:03:02 +02:00