AntidoteDB / antidote-erlang-client

Erlang client for Antidote
Apache License 2.0
15 stars 10 forks source link

Fix antidotec_reg:to_ops always returning empty list of operations #16

Closed v0idpwn closed 2 years ago

define-null commented 2 years ago

@v0idpwn shouldn't we change dirty_value/1 call accordingly?

v0idpwn commented 2 years ago

@define-null I'm not sure about what I should do there because: these modules may represent more than one kind of underlying crdt, and the dirty_value/1 callback doesn't really know about which type is there. For this specific scenario, I could write an implementation that would have a LWW behaviour, but this may not be true for what's being used.

I think instead this callback should be informed about which crdt is being used (so it can maybe use antidote_crdt to give a dirty value? not sure) or just be removed.

As a more concrete example, antidote_crdt has 3 kinds of sets: grow only, remove wins and observed remove. AFAIK, dirty_value/1 will always behave like it was a rw set.

@bieniusa perhaps you have some insight here? Should I just assume LWW behaviour? :~