Coder Social home page Coder Social logo

Test for ordering of log about antidote HOT 8 CLOSED

antidotedb avatar antidotedb commented on May 26, 2024
Test for ordering of log

from antidote.

Comments (8)

angbrav avatar angbrav commented on May 26, 2024

I have checked this property in dets.

It works as expected if we use insert_next instead of insert. The problem of using insert is that in case of trying to insert duplicates, it will move the duplicated operation to the tail of the list instead of leaving it where it was originally placed.

For instance, lets say we insert operations in the following order: op1 -> op3 -> op4 -> op2 for key floppy. A look up over floppy key will return [op1,op3,op4,op2]. But if we insert op3 again, by using the regular insert, the lookup would return [op1, op4, op2, op3] while using insert_new, the look up will still return [op1,op3,op4,op2] which the desired output.

I have changed all inserts by insert_new. Please keep this on mind.

I will close this issue

from antidote.

angbrav avatar angbrav commented on May 26, 2024

I was only half right!

I was right saying that by using insert, the order is not preserved when duplicate inserts. Nevertheless, I was wrong saying that insert_new solves the problem.

I have modify it once more. Now, before inserting, the logging_vnode first check whether the operation has been already log. In case it is already logged, it just ignores the operations and return success.

I am pretty sure it works properly now.

from antidote.

cmeiklejohn avatar cmeiklejohn commented on May 26, 2024

It would be super nice to write a QuickCheck property for this.

from antidote.

cmeiklejohn avatar cmeiklejohn commented on May 26, 2024

Can you just write a quick riak_test to assert this behavior is true so we can prevent against regressions? Then we will close this one out.

from antidote.

angbrav avatar angbrav commented on May 26, 2024

Actually, I think I cannot do it. The tricky part of this is when inserting duplicated operations. From the API there is no way to do that so I cannot generate a test. Plus, the API only allows us to get the object materialised, in order to further test this from riak_test, I would need to expose an operation that returns the list of operations without materialize.

Please correct me if I am wrong and give some hints on how to do it.

from antidote.

angbrav avatar angbrav commented on May 26, 2024

I was rethinking ad retesting this. The current implementation only ensures order per key and not per partition. Do we need it per partition? In that case I think we would need to modify the way we store thinks because in the way we do it now and using sets, I would say is not possible.

from antidote.

bieniusa avatar bieniusa commented on May 26, 2024

Probably fixed with the new log version.

from antidote.

cmeiklejohn avatar cmeiklejohn commented on May 26, 2024

Marking this finished, as it related to the older version of the logging virtual node.

from antidote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.