Aleksander Machniak
11ce37ef17
Performance: Limit number of SQL queries when "attaching" relations/tags to list of tasks/notes ( #3969 )
2016-02-13 17:35:29 +01:00
Aleksander Machniak
52053f355a
Performance: Optimize kolab_storage_folder::get_object() to use one sql query instead of two
...
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.
2016-02-13 11:33:01 +01:00
Aleksander Machniak
d2f74ee9fa
Performance: Skip SELECT query if we already know it will return no records (from previous SELECT COUNT(*))
2015-08-27 14:13:36 +02:00
Aleksander Machniak
a0ca17fb36
Fix missing events on edges of the view time range (when client timezone is different than server tz) (T698)
2015-08-18 12:39:55 +02:00
Thomas Bruederli
39449c11ce
Improve groupware object cache synchronization ( #3933 ):
...
- 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
2015-02-05 15:27:28 +01:00
Thomas Bruederli
29645a4736
Fix db table reference; forward constructor argument ( #4471 )
2015-02-03 17:26:03 +01:00
Thomas Bruederli
948a68136d
Handle possible errors from kolab_storage::get_folder() access ( #4378 )
2015-02-03 16:30:02 +01:00
Thomas Bruederli
5982ce8732
Add error checking/reporting facilities to kolab_storage_folder instances ( #4378 )
2015-02-03 13:15:56 +01:00
Thomas Bruederli
038e269d51
Check (expected) folder type and disable access to folder contents or cache if invalid ( #4378 )
2015-01-29 16:48:42 +01:00
Thomas Bruederli
af216b50e3
Improve sync lock setting/reading to avoid race conditions ( #4316 )
2015-01-23 14:43:45 +01:00
Aleksander Machniak
bfe6de5b54
Remove redundant updating of uid2msg map in synchronize()
2015-01-12 10:30:50 +01:00
Aleksander Machniak
ac4f6e7562
Avoid unused variables (also fixed some bugs) found in static code analysis
2014-11-21 10:03:18 +01:00
Thomas Bruederli
8627b72357
Avoid hitting executing time limit when synchronizing cache ( #3677 ):
...
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.
2014-11-04 13:04:57 +01:00
Thomas Bruederli
a3d5f717a2
Fix moving events to another calendar/folder and reloading it ( #3748 )
2014-10-09 16:37:31 +02:00
Aleksander Machniak
fbe1759c00
Skip multifolder insert for Oracle, we can't put long data inline
2014-09-18 15:24:16 +02:00
Aleksander Machniak
e9e871a43f
Quote columns in ORDER BY
2014-09-17 19:50:26 +02:00
Aleksander Machniak
9e49c5c83b
Quote also column aliases in sql tables, otherwise they will be returned uppercase in Oracle
2014-09-17 18:06:17 +02:00
Aleksander Machniak
788635b287
Use consistent column/table quoting in sql queries
2014-09-15 12:23:46 +02:00
Thomas Bruederli
54b6eb66de
Post-filter all tag objects (in case caching is disabled); improve kolab_storage_cache for the case caching is off
2014-08-26 12:03:11 +02:00
Thomas Bruederli
a9805a9063
Don't break kolab_storage_cache::select() return data if reading one single cache entry fails
2014-08-21 10:29:12 +02:00
Aleksander Machniak
a9f8715248
Fix caching configuration objects
2014-07-30 10:53:30 -04:00
Thomas Bruederli
18a106538b
Return the most recent message UID in case there are duplicates
2014-07-07 12:23:47 +02:00
Thomas Bruederli
24a6821749
Resolve UID -> MSGUID mapping from cache table index instead of using IMAP search
2014-04-01 16:32:28 +02:00
Thomas Bruederli
44088f37e6
Fix cache queries for ['tags','!=','x-complete']
2014-03-17 13:16:10 +01:00
Aleksander Machniak
9f7cd83f92
Make 3rd argument of kolab_storage_cache::save() really optional (Bug #2863 )
2014-02-25 10:47:10 +01:00
Thomas Bruederli
af6d366a1f
Optimize access to kolab contacts using a sorted and limited query ( #2828 )
...
- 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';
2014-02-10 11:46:50 +01:00
Thomas Bruederli
acbd45001c
Return null on error for UID queries (to remain backwards compatible)
2014-02-10 11:39:24 +01:00
Thomas Bruederli
22a1c7a7ee
Don't set error state on simple arrays; simplify query
2014-02-10 09:27:16 +01:00
Thomas Bruederli
816356813c
Save error state in kolab_storage_cache::select() return value
2014-02-10 08:51:51 +01:00
Thomas Bruederli
98741574d9
Always return a valid array/iterator
2014-02-07 13:24:11 +01:00
Thomas Bruederli
2ade247a0c
Return a kolab_storage_dataset itertor object from kolab_storage_cache::select()
...
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.
2014-02-06 17:25:16 +01:00
Thomas Bruederli
965a9b74b3
Fix anually recurrence end date on 32bit systems by replacing (overflowing) unix timestamps with DateTime objects ( #2613 )
2014-01-22 11:22:23 +01:00
Aleksander Machniak
05003d0596
Fixes/improvements for use with kolab_cache=false
2014-01-07 16:28:06 +01:00
Thomas Bruederli
229d31e90e
Avoid fatal errors if folder type information is missing ( #1321 )
2014-01-06 17:08:26 +01:00
Aleksander Machniak
b1e824becf
Added error handling in select() and count(), so on error they will return null
2014-01-02 13:37:39 +01:00
Aleksander Machniak
a7c4ebf15d
Fix kolab cache issues with malformed/unsupported character sequences
...
being stored in data, xml and words columns, which caused malformed
(and inaccessible) objects (Bug #1912 , #2662 )
2013-12-12 09:45:18 +01:00
Thomas Bruederli
158fa06a3c
Fix moving of Kolab objects to other folders in cache ( #2564 )
2013-11-20 17:17:31 +01:00
Aleksander Machniak
bcc8008dd5
Replace insert() with save() - needed after refactoring in last commit
2013-11-20 12:45:52 +01:00
Aleksander Machniak
a25fc1a961
Implement cache object update with UPDATE query instead of DELETE + INSERT (Request #2351 )
2013-11-20 10:43:17 +01:00
Thomas Bruederli
1f8e7cc478
Fix SQL syntax error when purging cache for a folder
2013-11-04 11:50:06 +01:00
Jeroen van Meeuwen (Kolab Systems)
4065542e07
Merge branch 'dev/kolab-cache-refactoring'
...
Conflicts:
plugins/libkolab/lib/kolab_storage_cache.php
2013-10-17 16:48:08 +02:00
Thomas Bruederli
595f1b6a8c
Only keep the last created object in memory ( #2353 )
2013-10-17 13:11:46 +02:00
Aleksander Machniak
053a640b87
Fix PHP warning when _sql_where() is callend with NULL as an argument
2013-10-14 15:04:00 +02:00
Aleksander Machniak
d67a7f0d76
Fix reference to kolab_cache table in count() method
2013-10-08 13:37:49 +02:00
Thomas Bruederli
cb8249d414
Rename kolab_folders.ID to kolab_folders.folder_id to be in sync with other Roundcube database conventions
2013-10-07 20:06:04 +02:00
Thomas Bruederli
6b89e36c4e
Merge remote-tracking branch 'origin/libkolab-cache-bypass' into dev/kolab-cache-refactoring
2013-10-07 17:34:17 +02:00
Aleksander Machniak
71619510c4
Improve bypass() method so it works "recursively"
2013-10-07 15:57:55 +02:00
Aleksander Machniak
9d174daf9f
Add option kolab_messages_cache_bypass
2013-10-07 15:05:34 +02:00
Thomas Bruederli
cc21e9161c
Fix typo introduced in commit 8680256c54
2013-10-07 14:59:20 +02:00
Thomas Bruederli
4f69556b71
Only set sync lock if folder hash changed
2013-10-07 14:31:48 +02:00