Commit graph

11 commits

Author SHA1 Message Date
Jim Nelson
f54f805501 Prefetch mail in background according to age of message: Closes #6365
This introduces a background account synchronizer into Geary that
prefetches email folder-by-folder to a user-configurable epoch.  The
current default is 15 days.

Additional work to make this user-visible is coming, in particular with

The primary purpose for this feature is to allow "full" conversations
(#4293), which needs more of the mailbox stored locally to do searching.
2013-02-25 20:18:37 -08:00
Jim Nelson
3723a5cdd4 Problems with replay queue when folder closes: Closes #5825, Closes #5824
Commit 327d183b (closing #5571) introduced regressions when a folder
is closing or closed.  This patch addresses two problems, one a crasher
and the other a case where the replay queue simply never closed when
requested.
2012-09-17 14:49:54 -07:00
Jim Nelson
327d183b8f Message marked read while connecting go unread later: Closes #5571
Bug was due to current flag on server being updated in local database
after the local operation had made a different change and was waiting
for normalization to complete to make the change on the server.
ReplayQueue now has a notion of a writebehind operation, which means
an immediate local change that a ReplayOperation waiting to make on
the remote must now account for.
2012-09-13 16:17:58 -07:00
Jim Nelson
0e2a533438 Remove SQLHeavy: Closes #5034
It is done.

Initial implementation of the new database subsystem

These pieces represent the foundation for ticket #5034

Expanded transactions, added VersionedDatabase

Further expansions of the async code.

Moved async pool logic into Database, where it realistically
belongs.

Further improvements.  Introduced geary-db-test.

Added SQL create and update files for Geary.Db

version-001 to version-003 are exact copies of the SQLHeavy scripts
to ensure no slight changes when migrating.  version-004 upgrades
the database to remove the ImapFolderPropertiesTable and
ImapMessagePropertiesTable, now that the database code is pure
IMAP.

When we support other messaging systems (such as POP3), those
subsystems will need to code their own database layers OR rely on
the IMAP schema and simply ignore the IMAP-specific fields.

ImapDB.Account fleshed out

ImapDB.Folder is commented out, however.  Need to port next.

ImapDB.Folder fleshed out

MessageTable, MessageLocationTable, and AttachementTable are now
handled inside ImapDB.Folder.

chmod -x imap-db-database.vala

OutboxEmailIdentifier/Properties -> SmtpOutboxEmailIdentifier/Properties

Moved SmtpOutboxFolderRoot into its own source file

SmtpOutboxFolder ported to new database code

Move Engine implementations to ImapDB.

Integration and cleanup of new database code with main source

This commit performs the final integration steps to move Geary
completely over to the new database model.  This also cleans out
the old SQLHeavy-based code and fixes a handful of small bugs that
were detected during basic test runs.

Moved Outbox to ImapDB

As the Outbox is tied to the database that ImapDB runs, move the
Outbox code into that folder.

Outbox fixes and better parameter checking

Bumped Database thread pool count and made them exclusive

My reasoning is that there may be a need for a lot of threads at
once (when a big batch of commands comes in, especially at
startup).  If performance looks ok, we might consider relaxing
this later.
2012-07-11 15:40:39 -07:00
Jim Nelson
10599a5a42 Replay queue not closing on connection hang or drop: Closes #5321
All IMAP commands now have a timeout which, if triggered, causes
the connection to be forcibly closed.  ConversationMonitor will
reestablish connection and start a re-sychronization.
2012-06-06 16:38:48 -07:00
Eric Gregory
e91eafce7a Pipelining disabled for "other" email services. Closes #4763 2012-02-23 16:17:59 -08:00
Adam Dingle
281f29bc77 Updated copyrights to 2012. Closes #4564 2012-01-10 10:40:34 -08:00
Jim Nelson
7e8edcb355 Transactions added to database code: Closes #4235
The entire database module now uses Transactions in order to guarantee atomicity of all
operations.  However, due to limitations in SQLHeavy and its implementation of async, we
can't use it (and SQLite's) transactional models.  This patch introduces a rather hamhanded
transactional model where the entire database is locked for each request using a
NonblockingMutex.  This is the safest approach, but certainly not an optimal one.  When
SQLHeavy's code is in place, hopefully we can rip this out with a minimum of fuss.
2011-10-12 16:52:54 -07:00
Jim Nelson
77d9962406 Fixes segfault when navigating between folders: Closes #3820
This bug was exacerbated by rapidly switching between folders.  This patch introduces a
Cancellable to most of the requests the client performs so it can cancel old requests when
the user switches folders.  This fixed some issues but exposed others.

Testing this demonstrates another bug: #4233
2011-10-06 19:04:17 -07:00
Jim Nelson
fb54fb1847 Now builds with Vala 0.14: closes #3756
This commit introduces a Scheduler module which deals with the problem of scheduling on the
idle or timeout queue unowned SourceFuncs (because the idle and timeout functions require
owned delegates).  It also takes care of a handful of places where an out parameter was not
being set before the method returned, which Vala's new code analysis now picks up.
2011-09-26 16:07:40 -07:00
Jim Nelson
7442caf88e Detect deleted (or moved) messages in open folder: #3793
This commit finishes the second half of #3793 by detecting when messages have been deleted
(or moved out of) an open folder and notifying the system of the change.  The nonblocking
synchronization primitives have been beefed up and may be broken out to a separate library
some day.

This commit also introduces the ReplayQueue, which replays events that occur on the server
locally.  This class will probably become much more important as time goes on, perhaps used
to store user events that are replayed on the server as well.
2011-07-29 20:10:43 -07:00
Renamed from src/engine/nonblocking/nonblocking-semaphore.vala (Browse further)