Detecting Hinted Handoff

Alexander Sicular siculars at
Fri Jul 22 14:01:33 EDT 2016

Take a look at the "pw" and "pr" tunable consistency options for gets and puts. The base level of abstraction in Riak is the virtual node - not the physical machine. When data is replicated it is replicated to a replica set of virtual nodes. Those virtual nodes have primary and secondary (due to failures) allocations to physical machines. When using "pr" and "pw" options you instruct Riak to only service the request from virtual nodes that are residing on their primarily allocated physical machines. In short, by abusing pr/pw you can infer the state of your cluster from your application. 

Obviously, this is not foolproof. There may also be additional 2i specific issues to consider. Nevertheless, I always liked this trick. 

Also, review this four part series on tunable consistency :



Sent from my iRotaryPhone

> On Jul 22, 2016, at 12:28, Hawk Newton <hawk.newton at> wrote:
> I've got a use case in which I'd like to use a secondary index but can't
> tolerate partial result sets caused by hinted handoffs.  I'm not currently
> running riak search and, as this is a fringe case, would prefer not add the
> additional overhead and complexity if I can help it.
> I'd like to detect a hinted handoff operation and throw a 503, if possible.
> Does anyone know of a way I can programatically detect if a hinted handoff
> is underway without having to shell out to riak-admin (yuck!) and parse the
> results? I'm running riak 2.0.5 at the moment.
> Thank you in advance.
> -- Hawk
> --
> View this message in context:
> Sent from the Riak Users mailing list archive at
> _______________________________________________
> riak-users mailing list
> riak-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list