Skip to content

A fetch can undo a local deletion that CloudKit hasn't confirmed yet #578

Open

Description

@mario-luis-dev

If a fetch delivers a record whose local deletion CloudKit hasn't confirmed yet (it also returns a device's own earlier saves), the row is written back. The deletion is still sent, so the record leaves the server but stays on the device for good. On a throttled device, 1,751 deleted rows came back this way.

Our fork keeps the deletion's metadata until CloudKit confirms it and ignores fetched records for it (f389788), and start() queues those deletions again when they drop out of CKSyncEngine's saved queue (704a878). 11 of the 13 tests in those commits fail on main and on #575. Happy to open a PR on top of #575 once it lands.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions