akka-samples icon indicating copy to clipboard operation
akka-samples copied to clipboard

sample.distributeddata.ShoppingCartSpec: must handle updates from different nodes

Open raboof opened this issue 8 years ago • 2 comments

[JVM-3] - must handle updates from different nodes *** FAILED ***
[JVM-3]   Set(LineItem [productId=1, title=Apples, quantity=7]) was not equal to Set(LineItem [productId=1, title=Apples, quantity=7], LineItem [productId=3, title=Bananas, quantity=4]) (ShoppingCartSpec.scala:91)
[JVM-2] - must handle updates from different nodes *** FAILED ***
[JVM-2]   Set(LineItem [productId=1, title=Apples, quantity=7]) was not equal to Set(LineItem [productId=1, title=Apples, quantity=7], LineItem [productId=3, title=Bananas, quantity=4]) (ShoppingCartSpec.scala:91)

raboof avatar Jun 30 '17 10:06 raboof

Interesting case. Might be the result of https://github.com/akka/akka/issues/22890 (fixed) as both setup and symptoms are very similar.

gosubpl avatar Nov 09 '17 09:11 gosubpl

It might also be a result of LWWMap anomaly - see here: https://github.com/akka/akka/blob/master/akka-distributed-data/src/test/scala/akka/cluster/ddata/LWWMapSpec.scala#L66-L68 I have added a PR for alternative Shopping Cart design based on ORMultiMap.emptyWithValueDeltas that should be free from this sort of anomalies.

gosubpl avatar Nov 14 '17 13:11 gosubpl