2 ms·
Reread what I wrote as what you wrote seems to be a totally different formulation. User 1 deletes line 3 while User 2 updates the instruction concurrently. The
by vlovich123 2y ago
Reread what I wrote as what you wrote seems to be a totally different formulation. User 1 deletes line 3 while User 2 updates the instruction concurrently. The end result is the unintended line is deleted due to a race. The CRDT preserved the structure of the document but not it’s semantic contents.
If it helps, I drew out the document in https://news.ycombinator.com/threads?id=vlovich123#40793833 https://news.ycombinator.com/threads?id=vlovich123#40793833
- ricardobeat 2y agoHa, I thought by instructions you meant CRDT commands, not actual text instructions. This is not a failure of CRDT but an inevitable consequence of trying to point to a specific line in a live document. It can happen even without concurrent updates, just two people editing a document in turns; as such it is impossible to resolve regardless of merge strategies, you have to use some kind of section marker that stays in place within the text as it moves (which is basically what every collaborative editor does internally).