Age | Commit message (Collapse) | Author |
|
In #3110 I lowered the chances of too long IMAP commands by splitting
the sync process.
As we've seen in production it's still possible that certain accounts
run into the issue that their chunked UID list is producing an IMAP
command that is too long. So I'm once again lower the chances by
lowering the chunk size.
This could have a tiny effect on sync performance as it now takes more
chunks to check for the changed/vanished messages of one account.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Anna Larch <anna@nextcloud.com>
|
|
Apparently there are occasions where we can't read the number of
messages of a mailbox. In that case the account setup fails with
``General error: 1364 Field 'messages' doesn't have a default value"``
on MySQL. This adds sane fallback values for the two mailbox stats.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
|
|
A message may send its own ID in the `references` header. In that case
the threading algorithm must ignore the closed loop and not set the
message as its own parent, to prevent an infinite loop later when
checking for anchestors.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
ignore folders which cause errors on access
|
|
Avoid usage of Horde header query as it causes issues with php8
|
|
Signed-off-by: Anna Larch <anna@nextcloud.com>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: jmechnich <joerg.mechnich@gmail.com>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
… instead of using a fragile autodetection every time we need one of
those. We will still try to auto-detect the mailboxes but the users will
have to option to change the destinations.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
IchbinkeinReh/fix-mailbox-does-not-support-mod-sequences
Catch more errors in sync function to recover from "Mailbox does not support mod-sequences" error on partial sync
|
|
it occurs
Signed-off-by: Patrick Bender <patrick@bender-it-services.de>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Add a CLI command to export thread data
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Just like a CLI priority inbox model training gives all the details, we
want to have the same to diagnose slow/faulty account syncs. This
changes the console logger adapter for the PSR logger and adds it to the
sync process.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: GretaD <gretadoci@gmail.com>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
nextcloud/enhancement/threading-two-similar-threads
Do not combine threads with identical subjects
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
When looking for changed and vanished UIDs we typically have to send the
list of the known UIDs to the IMAP server to know what went missing
meanwhile. With the number of UIDs sent, the size of the IMAP command
grows. At some point the server will just refuse the command due to its
size.
To circumvent this scenario, this patch splits the sync process into
new, changed and vanished. New is cheap in terms of data sent, so it
stays untouched. Changed and vanished will now split the known UIDs list
into chunks and retrieve partial sync results that way.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
The initial message cache sync estimates the UID range of the next
message page so it can fetch messages efficiently. There was an
uncovered edge case where the next page might not return any message,
simple because there is a larger gap between the existing UIDs.
Therefore the sync process was aborted as incomplete over and over as it
could not make any progress and the number of known messages never
reached the total number of messages on IMAP. This patch changes the
logic so it retries the next page if the current one is empty. To break
a possibly infinite recursion there is a check about reaching the
highest UID reported by the server.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Log the progress of an incomplete sync
|
|
This is helpful to determine whether the initial sync just takes long or
got stuck.
Ref https://github.com/nextcloud/mail/issues/2976#issuecomment-618833115
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
The initial message sync has to fetch potentially large amounts of data
and insert that into the database. To work around limitations with sync
requests triggered by web requests the process had already been made
interruptable and resumable. This means we never insert all the data
right away. Yet, the IMAP code fetched all UIDs before we capped it to a
maximum number of results per sync attempt. Depending on the mailbox
size this operation could require and allocate a lot of memory. On some
setup with lower memory limits, the process was aborted by the web
server due to a php memory exhaustion.
This patch modifies the IMAP code to optimize the memory usage by
limiting the amount of data that is fetched with each initial sync
attempt. The algorithm works as follows.
IMAP allows us to search in a range with a lower an upper bound UID.
While we know the highest known UID from the current cache values, we
can't derive the range for the next page from that as UIDs are not
continuous but might have holes due to deleted messages. If we assume
that messages of a mailbox are roughly distributed equally across the
assigned UIDs we can guess the max UID for the next range.
So we ask the server for min and max UIDs. The min or our known highest
UID is always the lower bound. Then we can calculate the distribution
rate from the min, max and number of messages and build the upper bound.
On everage this will fetch about the expected number of messages. It
could be more, but it could also be less. It shouldn't matter in most
cases.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|