Diffusion Sink da4b74e593f1

Avoid overwriting local changes with remote modifications.

Authored by cmollekopf on Jun 26 2018, 8:24 AM.

Description

Avoid overwriting local changes with remote modifications.

The case we ran into is the following:

  • Fetching the full payload and marking all messages of a thread as read

happens simultaneously.

  • The local modification to mark as read gets immediately overwritten

when the full payload arrives.

  • Eventually the modification gets replayed to the server though (and

the reversal isn't because coming from the source), so on next sync the
situation fixes itself.

To be able to improve this we try to protect local modifications in that
properties that have been modified since baseRevision (which currently
isn't, but should be equal to the last to the server replayed revision)
are not overwritten. This conflict resolution strategy thus always
prefers local modifications. baseRevision is currently set to the
current maximum revision of the store at the time when the resource
creates the modification.

Details

Committed
cmollekopfJun 26 2018, 8:24 AM
Parents
R9:121c3bc96a27: Fixed the lost update scenario
Branches
Unknown
Tags
Unknown