Riak 1.4 Released
basho.com
basho.com
Last write wins is indeed a bad default for data integrity; I believe we received feedback early on from customers that siblings were too confusing for developers.
The good news is that Kyle was deliberately testing things that were effectively guaranteed to break, thus the high rate of data loss. Most applications won't be simultaneously writing the same keys on both sides of a network partition; there will typically be a healthier mix of new and old keys being written.
> Secondary Indexing Improvements: Query results are now sorted and paginated, offering developers much richer semantics
So the results can be sorted but are not stored in sorted order in the secondary indices?
> Introducing Counters in Riak: Counters, Riak’s first distributed data type, provide automatic conflict resolution after a network partition
Awesome!
P.S. more info here: https://github.com/basho/riak/blob/1.4/RELEASE-NOTES.md
So the results can be sorted but are not stored in sorted order in the secondary indices?
Secondary indexes are stored sorted on disk, but segmented per vnode. Previously, they wouldn't be sorted before being returned to a client.
Suppose you're querying for "Bananas" through "Bavaria"; the node that contains "Bassoon" could return its first result before the node containing "Bananas" and "Barons", which would, in old Riak versions, result in out-of-order results.
Disclosure: I work at Basho, and have been working on riak-ruby-client updates to support the 2i improvements.
2i doesn't use mapreduce in normal operation.
Basho Hacker Sam Elliott started a CRDT cookbook that will walk you through using the counters in 1.4 (and eventually the new data types we add). That should get you started.
https://github.com/lenary/riak_crdt_cookbook/tree/counter_ex...
Enjoy. Also, come to ricon.io/west.html. We'll be talking plenty about Counters and all the huge stuff coming to Riak in the near future...