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

fix(caldav): fixed initial sync and double processing #46623

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

SebastianKrupinski
Copy link
Contributor

Summary

  • Initial sync no longer returns deleted items
  • fixed double processing of results when doing a follow up sync

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Always use prepared statements with parameters
  • Add a test to \OCA\DAV\Tests\unit\CalDAV\CalDavBackendTest

apps/dav/lib/CalDAV/CalDavBackend.php Outdated Show resolved Hide resolved
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also a (minor) performance optimization as we do $qb->func()->max('operation') instead of a busy loop now 👍

I'm gonna give this a test but looks good so far.

apps/dav/lib/CalDAV/CalDavBackend.php Outdated Show resolved Hide resolved
apps/dav/lib/CalDAV/CalDavBackend.php Outdated Show resolved Hide resolved
apps/dav/lib/CalDAV/CalDavBackend.php Outdated Show resolved Hide resolved
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Refactoring of the incremental sync case is a (minor) performance improvement. Additional unit tests are always welcome.

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski SebastianKrupinski merged commit 4c4e414 into master Aug 7, 2024
169 checks passed
@SebastianKrupinski SebastianKrupinski deleted the fix/issue-44127 branch August 7, 2024 12:49
@Altahrim Altahrim mentioned this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Deleted calendar objects included in initial sync
5 participants