basho/yokozuna — pull request #151 by beerriot (2013-07-25 21:52:46+00:00)
Title: fix index/extractor ring modification timestamp conflicts

Before this change, if two index or extractor-map changes happened within
one second, one of the modifications may be lost. This is due to the
1-second resolution in the ring's meta_entry records.

This commit solves the issue in two ways:

1. Modifications are made inside the ring_trans call, to the ring passed
into the function. The had been made in an always-clobber manner before.

2. The function sleeps for one second to ensure that the update will have
a newer timestamp.

The second point is not the greatest because it blocks other calls to
the riak_core_ring_manager process for that second. Reads are not blocked,
since they look at an ETS table instead. An intermediate serialization+wait
process could be used instead if the temporary block causes major problems.