ditto icon indicating copy to clipboard operation
ditto copied to clipboard

cache remove-before-insert ops

Open alex-shapiro opened this issue 7 years ago • 0 comments

Right now, Ditto discards any REMOVE op that is received before its corresponding INSERT op. This leads to inconsistencies in the following case:

site1: INSERT(A) -> op1 site2: EXECUTE(op1) site2: REMOVE(A) -> op2 site3: EXECUTE(op2) site3: EXECUTE(op1)

This PR fixes the bug by caching any REMOVE op received before its corresponding INSERT op and executing the REMOVE op once the INSERT has been executed.

alex-shapiro avatar Mar 18 '18 05:03 alex-shapiro