How could we test/simulate siblings?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How could we test/simulate siblings?

Cagdas Tulek
Hi,

What is the best way of creating sibling records to see if my logic is handling them correctly?

Best,

Cagdas


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How could we test/simulate siblings?

Justin Sheehy
Hi, Cagdas.

On Fri, Nov 12, 2010 at 8:17 PM, Cagdas Tulek <[hidden email]> wrote:

> What is the best way of creating sibling records to see if my logic is
> handling them correctly?

Ensure that allow_mult is set to true.

Create some object B/K.

Get that object.  It will come with some vector clock V.

Put some new value X to B/K, using vector clock V in the put request.

Put some new value Y to B/K, using vector clock V in the put request.
(different value but same vclock as the previous put)

Get B/K.  You should get multiple values and some vclock V1.

If you wish to resolve back to a single value, store some new value Z
using vclock V1.

-Justin

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: How could we test/simulate siblings?

Cagdas Tulek
Thanks Justin.

On Fri, Nov 12, 2010 at 5:36 PM, Justin Sheehy <[hidden email]> wrote:
Hi, Cagdas.

On Fri, Nov 12, 2010 at 8:17 PM, Cagdas Tulek <[hidden email]> wrote:

> What is the best way of creating sibling records to see if my logic is
> handling them correctly?

Ensure that allow_mult is set to true.

Create some object B/K.

Get that object.  It will come with some vector clock V.

Put some new value X to B/K, using vector clock V in the put request.

Put some new value Y to B/K, using vector clock V in the put request.
(different value but same vclock as the previous put)

Get B/K.  You should get multiple values and some vclock V1.

If you wish to resolve back to a single value, store some new value Z
using vclock V1.

-Justin


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com