Read Before Writes on Distributed Counters

Sam Elliott sam.elliott at basho.com
Thu Oct 17 10:18:31 EDT 2013


It is perfectly safe with Counters to "blindly" issue an update. Clients (for counters) should allow a way to blindly send updates.

You should only be aware that your updates are *not* idempotent - if you retry an update to a counter, both updates could be preserved.

Sam
-- 
Sam Elliott
Engineer
sam.elliott at basho.com
--


On Thursday, 17 October 2013 at 10:03AM, Weston Jossey 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
> riak-users at lists.basho.com (mailto:riak-users at lists.basho.com)
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com







More information about the riak-users mailing list