by lobster_johnson · 12y ago · 0 comments
One issue: I'm surprised that the merge algorithm seems to generally pick the last write as the winner. For example about registers, the docs say: "The most chronologically recent value wins, based on timestamps". But that's not always correct: For example, if client A reads version 10 and writes version 11, and then some client B has version 9 and writes version 12, you have a conflict where node A's version should win even though it's older, since it's history is more correct.
Or is the documentation just ambiguously worded? It says the algorithm is _weighted_ towards last-write-wins, but also that it takes history into consideration.
For something like a single string register inside a Map (which is the register you refer to) a simple LWW seemed adequate. Maybe in future we can add some more complex type here, maybe with causal history + timestamp arbitration (like Riak's allow_mult=false.)