swimos / swim

Full stack application platform for building stateful microservices, streaming APIs, and real-time UIs
https://www.swimos.org
Apache License 2.0
488 stars 41 forks source link

Join Map Lane repeatedly executes didUpdate #69

Open DobromirM opened 3 years ago

DobromirM commented 3 years ago

Using the same example from #67 the join map lane will keep executing the same didUpdate callback indefinitely every 90 seconds.

Input

@command(node:"/unit/foo", lane:"addItem")"foo"

Initial Output:

join map lane: foo count changed to 1 from 1
join map lane agent didStart: foo count changed to 1 from 0
join map lane: foo count changed to 1 from 1

Output after 90 seconds:

join map lane: foo count changed to 1 from 1
join map lane agent didStart: foo count changed to 1 from 0
join map lane: foo count changed to 1 from 1
join map lane: foo count changed to 1 from 1
join map lane agent didStart: foo count changed to 1 from 0
join map lane: foo count changed to 1 from 1

Output after 180 seconds:

join map lane: foo count changed to 1 from 1
join map lane agent didStart: foo count changed to 1 from 0
join map lane: foo count changed to 1 from 1
join map lane: foo count changed to 1 from 1
join map lane agent didStart: foo count changed to 1 from 0
join map lane: foo count changed to 1 from 1
join map lane: foo count changed to 1 from 1
join map lane agent didStart: foo count changed to 1 from 0
join map lane: foo count changed to 1 from 1

etc...

Might be resolved when #67 is resolved.

DobromirM commented 3 years ago

Despite that join value lanes also have a duplication callback bug, they are NOT affected by this.