Read Before Writes on Distributed Counters

Weston Jossey weston.jossey at gmail.com
Thu Oct 17 10:03:37 EDT 2013


In the context of using distributed counters (introduced in 1.4), is it strictly necessary to perform a read prior to issue a write for a given key?  A la, if I want to blindly increment a value by 1, regardless of what its current value is, is it sufficient to issue the write without previously having read the object?

I ask because looking at some of the implementations for counters in the open source community, it's common to perform a read before a write, which impacts performance ceilings on clusters with high volume reads / writes.  I want to verify before issuing some PRs that this is in fact safe behavior.

Thank you!
-Wes Jossey



More information about the riak-users mailing list