when two or more users add an item on an empty list at the same time
fix: first added item getting deleted sometimes #43
fix-init-override into master c12bdbee1c
to 40d7b4801d
weird, somehow
approving code - i am not deep into this CRDT thing, to judge that semantically. i would appreciate at least one more review, eg. from @rtn or Aaron
does yjs has the same problem?
i am not deep into this CRDT thing
Me neither. Basically it's just about two peers doing doc.items = [] at the same time.
does yjs has the same problem?
No, the API is different there. You'd do doc.getArray('items') every time, you don't have to initialize it.
I'm a little surprised that automerge doesn't treat the empty document as a universally shared point in history. The fact that this type of hardcoded patch is necessary seems more like an unfortunate implementation detail than a theoretical necessity. In any case, this seems like the right solution.
The following section in the docs suggests there will be more challenges with automerge-based apps when we get around to supporting app updates, so I'll keep an eye on this.
Nice fix and thanks for highlighting this issue!
the empty document
To be precise, it's not about an empty document, but rather an empty array/list. An empty document does act as a shared point. But yeah, as I said, Yjs, for example, is devoid of this problem.
Thanks for reviewing!
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?