basho/yokozuna — pull request #301 by rzezeski (2014-02-11 22:57:05+00:00)
Title: Mark AAE trees as built immediately

When possible, mark the index hashtree as built immediately. This allows
exchange to be performed earlier. It is useful when standing up new
nodes which don't have any data yet and you don't want to wait for the
AAE manager to build all partitions.

This can be tested by hand with the following steps.

1. Build a 1 node rel/stage of riak: `make stage`

2. Enable search: `sed -e 's/search = off/search = on/' -i.back rel/riak/etc/riak.conf`

3. Start the node: `./rel/riak/bin/riak start`

4. Attach: `./rel/riak/bin/riak attach`

5. Print Yokozuna tree info: `rp(yz_kv:compute_tree_info()).`

6. Notice that info for all partitions is `undefined`

7. Wait 15s: `timer:sleep(15000).`

8. Print tree info again: `rp(yz_kv:compute_tree_info()).`

9. Notice all the partitions now have a 3-tuple timestampe where defined once was.

NOTE: You need to attach (step 4) immediately after start and print
the tree info to make sure you beat the 15 second AAE tick.