basho/riak_core — pull request #219 by jtuple (2012-08-03 04:47:59+00:00)
Title: Ensure legacy nodes are probed when new capabilities registered

The capability system caches prior probes of legacy app vars when dealing
with legacy nodes. Prior to this commit, the logic was simple. If there
were any cached results, no probes were performed. Unfortunately, this
could lead to a race condition. If capabilities were probed before all
applications (eg. riak_core, riak_kv) had started and registered their
capabilities, the cache would only include some results, and no probes
would be performed for the newly registered capabilities. This commit
makes things more fine-grained, checking for cached results of individual
capabilities.

This change does nothing for non-legacy nodes. All nodes that support
the capability system natively already worked with delayed registration.