automerge / hypermerge

Build p2p collaborative applications without any server infrastructure in Node.js
MIT License
1.28k stars 66 forks source link

desynchronization repro #2

Closed pvh closed 6 years ago

pvh commented 6 years ago

Found a way to get things out of sync.

1) Start Alice: node pp-mini.js --name=alice --save=data-alice --debug 2) Start Bob: node pp-mini.js --name=bob --save=data-bob --debug <ALICE'S SOURCE> 3) Start Chuck node pp-mini.js --name=chuck --save=data-chuck --debug <BOB'S SOURCE>

Note that all three are in sync by changing each one's pixels.

Now we desynchronize.

1) Quit "Chuck" and restart it. 2) Change some pixels.

Note how none of the other sessions reflect Chuck's changes.

Updating the other two docs causes Chuck to print "Doc updated" but no changes are visible.

jimpick commented 6 years ago

Yeah, for hypermerge-micro, all the actors need to agree on what the source key is or it's just not going to work. There should be a check in there to make it production ready.

pvh commented 6 years ago

The same bug exists if Chuck follows Bob. Also, I think the behaviour you describe is at least partially a design problem rather than a software bug.

jimpick commented 6 years ago

I'm finding some problems where the hypercores aren't getting synced with all 3 actors... needs investigation.