Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebased push of riak_kv#807 (put_merge refactor + EQC) #835

Merged
merged 2 commits into from Feb 13, 2014

Conversation

russelldb
Copy link
Member

Refactor the common put_merge code into riak_object.
Create a EQC statem test for riak_object:merge, reconcile, syntactic_merge that uses Ricardo Goncalves's DVVSet code as a model (https://github.com/ricardobcl/Dotted-Version-Vectors)

This is a rebased push of riak_kv#807. (cc @metadave)

Add copious comments and a command for stale puts
Since the put_merge code was copied into two tests, both of which
only manipulate riak_object, it seemed a refactor made sense.

Looking at the put merge code, it only manipulates internal state
of riak_object, so I think it is the correct place for the code.

It also smooths the way for a general refactor of riak_object
into a CRDT and riak_kv into riak_crdt (mwah ha ha ha ha!)
@bookshelfdave
Copy link

R16B02b4:[rdb/robj-merge-eqc-rebased]prime:~/basho/riak_ee/deps/riak_kv$ ./rebar eunit skip_deps=true suites=riak_object_dvv_statem
==> riak_kv (eunit)
...
======================== EUnit ========================
riak_object_dvv_statem:57: eqc_test_ (module 'riak_object_dvv_statem')...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
OK, passed 1000 tests

sibling_count
25.2% 0
15.0% 2
13.9% 1
10.5% 3
9.1% 4
7.0% 5
4.7% 6
4.3% 7
2.9% 8
1.7% 10
1.5% 9
1.1% 12
0.8% 11
0.5% 14
0.5% 13
0.4% 15
0.2% 21
0.2% 18
0.2% 17
0.2% 16
0.1% 20

18.40% {riak_object_dvv_statem,put,4}
18.01% {riak_object_dvv_statem,replicate,4}
17.38% {riak_object_dvv_statem,get,4}
17.36% {riak_object_dvv_statem,get_put,7}
13.01% {riak_object_dvv_statem,update,5}
9.82% {riak_object_dvv_statem,make_ring,2}
6.01% {riak_object_dvv_statem,set_nr,1}
[43.605 s] ok
=======================================================

+1

russelldb added a commit that referenced this pull request Feb 13, 2014
Rebased push of riak_kv#807 (put_merge refactor + EQC)
@russelldb russelldb merged commit 7774d85 into develop Feb 13, 2014
@russelldb russelldb deleted the rdb/robj-merge-eqc-rebased branch February 13, 2014 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants