Store subscriptions in SQL database - to support subscribing to DAV folders
Details
- Reviewers
mollekopf - Group Reviewers
Syncroton Developers - Commits
- rS6c0a8768f156: Subscriptions engine
Diff Detail
- Repository
- rS syncroton
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
For existing installations that do not use a DAV backend; I suppose we'll just loose the subscription state, but it should otherwise work? And we'll loose the integration between imap subscription state and the syncroton subscription state, correct?
| lib/kolab_sync_storage.php | ||
|---|---|---|
| 1928 | This used to operate on cached data, but now we seem to be executing a sql query everything to list the subscriptions, which might actually matter for this function (we'll end up doing the lookup once per folder). Maybe we should just populate the cache for all folders in one go? | |
| tests/SyncTestCase.php | ||
| 75 | delete then? | |
I agree that the way we do id2name and vice versa sucks. Passing type (model name) everywhere is not great. I think in future we could improve that (e.g. by using IDs in form of "<type-class>:<id>", but it would be a BC break requiring a full re-sync.
I'm also thinking about using Cyrus v3 MAILBOXID (RFC 8474) for IMAP folders (for DAV the URI is fine, imo). Unfortunately Dovecot does not support that, and I'm not sure if falling back to using IMAP annotations (and setting them with generated uuid) would be a step in the right direction.
| lib/kolab_sync_storage.php | ||
|---|---|---|
| 1928 | It shouldn't be a big problem. We're doing a query per folder type class, not per folder. $this->folder_uids is being populated with all subscribed folders of a specified class. | |
| tests/SyncTestCase.php | ||
| 75 | That was a tricky part to figure out before, so I'll leave it in case we need to use IMAP in future here. | |
I think kolab_subscriptions.php is missing?
We should probably just get this merged, but it would be nice if we could fall-back to the metadata value for a seamless upgrade path (not sure what the current state is).
It is part of D4683: Activesync subscriptions (in SQL database)
We should probably just get this merged, but it would be nice if we could fall-back to the metadata value for a seamless upgrade path (not sure what the current state is).
There is a fallback in kolab_subscriptions::get_subscriptions().
- Merge branch 'master' into dev/kolab-subscriptions
- Move DB migration file forward
- Cleanup
- Fix merge regressions
- Remove redundant queries
- CS fixes