basho/riak_kv — pull request #476 by beerriot (2013-02-02 15:29:20+00:00)
Title: Take node liveness into account during contant hash choice for reduce phase

This PR builds on work submitted in #475 (I'd suggest squashing on merge). I'd like to have this reviewed for inclusion in the RC2 of Riak 1.3, since it fixes a bug in pipe's MR emulation that was handled by the now-removed luke system.

Before this PR, generating a constant hash for a reduce phase in an MR query did not take node-liveness into account. We use `nval=1` in reduce phase fittings to make sure that all inputs end up at one vnode, instead of accidentally being spread due to liveness flickering. But, this meant that a down vnode might be chosen to reduce, and this could cause surprising (incorrect) results in some cases.

The test submitted in basho/riak_test#195 is a reproducer. It should fail before this PR, and pass after it.