Page MenuHomePhorge

Subscriptions engine
Needs ReviewPublic

Authored by machniak on Apr 15 2024, 11:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 15, 8:54 PM
Unknown Object (File)
Sat, Jun 8, 6:26 PM
Unknown Object (File)
Sat, Jun 8, 7:08 AM
Unknown Object (File)
Fri, Jun 7, 3:49 PM
Unknown Object (File)
Wed, Jun 5, 2:34 AM
Unknown Object (File)
Wed, Jun 5, 2:23 AM
Unknown Object (File)
Wed, Jun 5, 1:01 AM
Unknown Object (File)
Tue, Jun 4, 11:11 PM

Details

Reviewers
None
Group Reviewers
Syncroton Developers
Summary

Store subscriptions in SQL database - to support subscribing to DAV folders

Diff Detail

Repository
rS syncroton
Branch
dev/kolab-subscriptions
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 47055
Build 17940: arc lint + arc unit

Event Timeline

machniak created this revision.
  • Merge branch 'master' into dev/kolab-subscriptions

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?

  • Add 2nd arg to folder_subscriptions() calls

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.