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] Don't enqueue sync if local collection is up-to-date #1174

Draft
wants to merge 1 commit into
base: main-ose
Choose a base branch
from

Conversation

rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Dec 15, 2024

Purpose

This PR checks the sync-token of incoming push messages. If the local collection is already up-to-date, no sync worker is enqueued. This is usually the case if local changes are uploaded:

  1. DAVx⁵ uploads the changes during a sync → sync token changes to ST1, push message is sent
  2. DAVx⁵ continues the sync → collection is now synced and in state ST1
  3. DAVx⁵ receives the push message with sync-token=ST1.

Now it doesn't enqueue a new sync, because it's already up-to-date.

Short description

When receiving a push message, the sync token is checked for the given collection before a sync is enqueued.

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@rfc2822 rfc2822 linked an issue Dec 15, 2024 that may be closed by this pull request
2 tasks
@rfc2822 rfc2822 added the enhancement New feature or request label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Push] Support sync-token
1 participant