basho/riak_core — pull request #489 by kellymclaughlin (2014-01-10 23:30:24+00:00)
Title: riak_core_net_ticktime should be guarded by capability

To prevent case where a user has not yet loaded the module on a pre-2.0 node.

Quick sketch:

* Capability has two modes, supported & unsupported.
* On startup, if module is available register the capability w/ supported as the preferred mode, otherwise unsupported
* Since `start_set_net_ticktime_daemon` runs first on a riak node, guard it by a check for the currently preferred mode across the cluster and only proceed if it is supported. If it fails, this indicates to the user that one or more nodes does not have the module
* User loads module on node (add its to basho-patches) and calls new function `riak_core_net_ticktime:enable/0`. This re-registers the capability on the node w/ supported as the preferred mode
* Once done on all nodes that did not have the module and ring has converged user can safely call `start_set_net_ticktime_daemon` and since the capability prefers supported it will proceed