We observed garbled Loro document states when opening documents which have a longer history of edits / multiple authors. Usually re-opening the document solves the issue and the text appears correct again. This might require 2-3 re-opens before this is the case though.
I assume this is some kind of race-condition where operations get processed in different order. There can be different reasons for this, here some theories without debugging yet:
- Loro doesn't keep track of ordering across multi-writer deltas, we need to add our own vector clock to preserve causal ordering
- Operations containing Loro deltas of multiple writers get "interleaved". For example: We have authors A, B and C with each 3 operations, we process A1, then C1, then A2, A3, then B2 etc. instead of A1, A2, A3, then B1, B2, B3, then C1, C2, C3 etc.
- Operations are all theoretically in correct order, but some async bug causes them to still be processed in the wrong order higher up the stack
We observed garbled Loro document states when opening documents which have a longer history of edits / multiple authors. Usually re-opening the document solves the issue and the text appears correct again. This might require 2-3 re-opens before this is the case though.
I assume this is some kind of race-condition where operations get processed in different order. There can be different reasons for this, here some theories without debugging yet: