Store subscriptions in SQL database - to support subscribing to DAV folders
Details
Diff Detail
- Repository
- rS syncroton
- Branch
- dev/kolab-subscriptions
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 47100 Build 17955: arc lint + arc unit
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 | ||
---|---|---|
1887 | 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 | ||
---|---|---|
1887 | 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. |