Summary: Use QRESYNC, get rid of "scheduled" cache reset, other small improvements
Reviewers: #roundcube_kolab_plugins_developers, vanmeeuwen
Reviewed By: #roundcube_kolab_plugins_developers, vanmeeuwen
Subscribers: vanmeeuwen, #roundcube_kolab_plugins_developers
Differential Revision: https://git.kolab.org/D1726
https://issues.kolab.org/show_bug.cgi?id=4067 and (Bifrost#TT20881)
It happens that IMAP folder may contain many objects with the same UID.
The precise reason for this is unknown, but it can be e.g. a faulty
client or an error between "create a new object instance" and "remove the
old one". It causes various issues when editing such objects.
With the change we assume that the most recent object (with max. IMAP UID)
is the one that should be used and all the older instances will be removed
automatically.
Summary:
Fixes race-conditions between Kolab folders and Roundcube core
where skip_deleted/threading could be set for operations outside
of Kolab plugins, causing e.g. inability to see \Deleted messages.
Fixes T1145.
Reviewers: #roundcube_kolab_plugins_developers, vanmeeuwen
Reviewed By: #roundcube_kolab_plugins_developers, vanmeeuwen
Maniphest Tasks: T1145
Differential Revision: https://git.kolab.org/D112
Before the change to get an object by UID we first resolve UID to IMAP-UID
and then fetch the object data by IMAP-UID - two select queries. Now we
directly select the data by UID.
- store and compare the number of objects stored after last sync
- use a (configurable) refresh interval and periodically force re-sync
ATTENTION: requires database schema updates
This change will make the synchronization process abort before the time limit is reached.
The folder is not flagged as fully synchronized and subsequent requests will continue the synchronization.
Application scripts can read the public 'sync_complete' property and initiate a next sync request.
- Add columns for sorting in kolab_cache_contact
- Extend bin/modcache.sh script to update existing cache records
- Add setters for ORDER BY and LIMIT clauses
- Adapt the kolab_addressbook plugin to fetch contacts page-wise
ATTENTION: This changeset contains database schema changes!
Run `bin/updatedb.sh --dir plugins/libkolab/SQL --package libkolab`
Afterwards, the cached data needs to be updated. To do so, either run
`plugins/libkolab/bin/modcache.sh update --type=contact`
or execute the following query
DELETE FROM `kolab_folders` WHERE `type`='contact';
to manage memory usage for large result sets (#2828).
Attention!
Do not cast the return value of kolab_storage_folder::select() calls into an array anymore.