Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Push] Support sync-token #1147

Open
2 tasks
rfc2822 opened this issue Dec 1, 2024 · 1 comment · May be fixed by #1174
Open
2 tasks

[Push] Support sync-token #1147

rfc2822 opened this issue Dec 1, 2024 · 1 comment · May be fixed by #1174
Labels
dependent enhancement New feature or request

Comments

@rfc2822
Copy link
Member

rfc2822 commented Dec 1, 2024

Currently DAVx⁵ enqueues a sync worker whenever it receives a push message.

However the sync-token property of the push message should be checked, and if the sync-token is already up-to-date, no sync should be enqueued.

This avoids redundant sync jobs which are caused by own uploads:

  1. Upload by DAVx⁵ changes sync-token to new-sync-token. Server sends push message, but it will take a few seconds to arrive.
  2. DAVx5 runs sync, stores current sync-token=new-sync-token.
  3. DAVx⁵ receives push message with sync-token=new-sync-token. Because the collection is already up-to-date, no new sync worker is enqueued.

Possible way to implement:

  • Provide some way to get a LocalCollection from the collection ID, probably as method of LocalDataStore (and then select the data store according to the collection type).
  • If we have a LocalCollection that has been updated, we can compare the sync-token with localCollection.lastSyncState and ignore the push if the collection is already up-to-date.

Depends on bitfireAT/ical4android#171
Depends on https://github.com/bitfireAT/davx5/issues/603 (not strictly, but should be done afterwards because the database collection ID of local collections is required)

@rfc2822 rfc2822 added the enhancement New feature or request label Dec 1, 2024
Copy link

github-actions bot commented Dec 12, 2024

This PR/issue depends on:

@rfc2822 rfc2822 linked a pull request Dec 15, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependent enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

1 participant