Hi Wes, The client application does not need to perform a read before a write, the riak server must read from disk before updating the counter. Or at least it must with our current implementation.
What PRs did you have in mind? I'm curious. Oh, it looks like Sam beat me to it…to elaborate on his "not idempotent" line, that means when riak tells you "error" for some counter increment, it may only be a partial failure, and re-running the operation may lead to over counting. Cheers Russell On 17 Oct 2013, at 16:03, Weston Jossey <[email protected]> wrote: > 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 > _______________________________________________ > 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
