basho/riak_kv — pull request #334 by engelsanchez (2013-01-31 16:52:32+00:00)
Title: Every read triggers a read-repair when Last-write-wins=true

When LWW=true on a bucket, every replica increments the vclock. On read a read-repair is triggered due to mismatched vclocks at each replica, which means a put, and an incremented vclock, so the next read triggers a read-repair (and so on ad infinitum.)

This does not occur with an index capable backend, it is a product of the fast path optimisation for LWW to avoid a read before write https://github.com/basho/riak_kv/blob/master/src/riak_kv_vnode.erl#L650

LWW = true and backend is not index capable.

Funnily, we get a write after every read rather than a read before every write.

Potential fix is only increment vclock on the co-ordinating vnode.

Thanks to Martin Sumner at the NHS for the catch.