mute-structs icon indicating copy to clipboard operation
mute-structs copied to clipboard

Splitted block preservation leads to divergent document's models

Open Conaclos opened this issue 7 years ago • 0 comments

Severity: Low

Problem

Let three LogootSplit operations:

  • o1 = ins([b, x .. y]) with x < z < y
  • o2 = ins([b, z, u .. v])
  • o3 = del([b, z, u .. v])

Note that o3 depends on o2. Thus, o2 is always runs before o3.

The execution of o1 then o2 and o3 lead to split the first block. The final logootSplit list includes two blocks: [b, x .. z] and [b, z+1 .. y] The execution of o2 and o3, then o1 do not split the last inserted block. Thereby, the final logootSplit list includes a single block: [b, x .. y]

As a result, two different lists of blocks can be obtained from the same set of commutative operations. Note that this does not change the order of the chars and then does not threat the convergence of the participant's views.

Symptom

The digest value is not identical.

Possible fix

Upon deletion of an entire block, we could verify whether the new adjacent blocks can be merged. This also ensures a stronger convergence of the document's models.

Another solution could be to fix digest by computing the value over each char identifier.

Conaclos avatar Apr 14 '17 11:04 Conaclos