HomePhorge

Handle resent Sync commands without resetting the sync state

Description

Handle resent Sync commands without resetting the sync state

If a client does not receive a response from a sync command, it's
possible that it needs to resend it.
In order to not duplicate added entries in such a case, we need to
remember clientId => serverId mappings (there is no other stable
identifier), and make sure we can generate
an idential response while not duplicating changes.

Modifications and Deletions are simply ignored in case of a retried
Sync command, as we are not required to include them in a response.

The one exception that we are not handling is that changes that include
an attachment, should generate a response (per spec):

"The server is not required to send an individual response for every operation that is sent by the client. The client only receives responses for successful additions, successful fetches, successful changes that include an attachment being added, and failed changes and deletions. When the client does not receive a response, the client MUST assume that the operation succeeded unless informed otherwise."

Details

Provenance
mollekopfAuthored on May 5 2023, 10:34 PM
mollekopfPushed on Aug 21 2023, 6:45 PM
Parents
R4:7264c0a89e08: Always keep the previous sync key
Branches
Unknown
Tags
Unknown

Event Timeline