AntidoteDB / antidote

A planet scale, highly available, transactional database built on CRDT technology
https://www.antidotedb.eu
Apache License 2.0
831 stars 89 forks source link

Handoff in materializer_vnode #203

Open deepthidevaki opened 8 years ago

deepthidevaki commented 8 years ago

After handoff, the operations may be applied twice. This is because, logging_vnode does the handoff and gets the operations to the log. materializer_vnode does the handoff independently, and caches the operations. Then (for some executions) the load_from_log in the materilizer_vnode re-loads the operation that is already cached by the handoff, thus duplicating them. The test is in the branch handoff_materiliazer riak_test/log_handoff_test.erl.

tcrain commented 8 years ago

Ok, it looks like I introduced this when add the recovery from the log, so I will fix it. The test you mention will fail on master? Can I use it to test if the fix I will make works?

deepthidevaki commented 8 years ago

Yes. It fails on master. It is the same test that is in the master, but with op-crdts. The bug is hidden with state based crdts.