Fix divergence bug in undo/redo

As part of #1405, we changed the way we performed undo and redo to
support combining transactions that were not temporally adjacent for
IME purposes.

We introduced a bug with that release that caused divergence
when performing undo: the bug was caused by only changing the visibility
of fragments whose insertion id was contained in the undo operation. However,
an undo operation also affects deletions which we were mistakenly not
considering. Randomized tests caught this but I guess we didn't run enough
of them.
This commit is contained in:
Antonio Scandurra 2022-08-17 11:26:05 +02:00
parent da805b3d13
commit ab236a6008
3 changed files with 3 additions and 14 deletions

View file

@ -901,8 +901,7 @@ message Operation {
uint32 local_timestamp = 2;
uint32 lamport_timestamp = 3;
repeated VectorClockEntry version = 4;
repeated VectorClockEntry transaction_version = 6;
repeated UndoCount counts = 7;
repeated UndoCount counts = 5;
}
message UpdateSelections {