If your writes and reads are written with PR+PW > N (note PR/PW and not R/W), 
then you should get read-your-writes consistency. There is unfortunately a bug 
with PR/PW [1] that means this is not a 100% guarantee at the moment. I'm 
hoping for it to be fixed by Riak 1.4, if not earlier. I don't have JavaDoc 
handy, but setting PR and PW should be the same as setting any other 
per-request parameter. For an N value of 3 (the default), I'd likely recommend 
setting PR and PW to 2. You can get around the aforementioned bug by setting 
PR=PW=N, which will lower your availability, but gaurantee read-your-writes 
consistency.

Note that read-your-writes is slightly different than just monotonic read 
consistency, but I'm guessing it's closer to what you had in mind.

[1] https://github.com/basho/riak_kv/issues/388

Reid


On Dec 5, 2012, at 11:13 PM, "Vergara, Jeaneth Aguilar" <[email protected]> 
wrote:

> Hi there,
> 
> We're trying to implement monotonic read consistency at the client side using 
> Riak's Java client. We're kind of stumped on how to do vector clock 
> comparison so we can ensure that we're always getting the latest version.
> 
> Any tips would be appreciated.
> 
> Thanks,
> Jing
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

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

Reply via email to