gritzko/swarm

Synchronisation doesn't works proper in Demo3 example

chicoxyzzy opened this issue · 6 comments

http://ppyr.us:8001/demo3/index.html

Steps to reproduce bug:

  • select all Availability items in schedules being online
  • toggle both schedules to offline
  • select first two items on left side to Consistency
  • select last two items on right side to Partition tolerance
  • toggle right schedule online
  • toggle left schedule online

Now data is inconsistent.
The order of last two steps is important.

Reproduced. Thanks.

Sorry for the delay. The issue is related to .init event relay optimizations and it caused a little bit of refactoring.

I can't reproduce this. Is it still an issue?

If it does not reproduce then it is another bug. Kidding.
Sorry, there are some entangled issues and it created an avalanche effect.
Will be fixed in 0.4, with the new version vector scheme.

Cool! Thank you @gritzko. I am fascinated by this project.

fixed in #45
Use someSyncable.onStateReady(callback); instead of someSyncable.on('.init', callback); to be sure the syncable-object has some state.