anchor.diff:                  source :: local | {remote, [node()], non_neg_integer()}}).
   
   init([]) ->
  -    self() ! refresh,
  -
  -    ns_pubsub:subscribe_link(ns_config_events, fun handle_config_event/2, self()),
  +    Self = self(),
  +
  +    Self ! refresh,
  +
  +    ns_pubsub:subscribe_link(ns_config_events, fun handle_config_event/2, Self),
  +    ns_pubsub:subscribe_link(ns_node_disco_events, fun handle_node_disco_event/2, Self),
   
       {ok, #state{num_connections = 0,
                   indexes = [],
  
positive.code:     {noreply, NewState};
  handle_cast(restart_done, #state{restart_pending = true} = State) ->
      {noreply, State#state{restart_pending = false}};
  handle_cast(notable_config_change, State) ->
      misc:flush(notable_config_change),
      {noreply, State#state{source = get_source()}}.
  
  handle_info(refresh, State) ->
  
negative.code:         true ->
              local;
          false ->
              IndexNodes = ns_cluster_membership:index_active_nodes(Config, actual),
              {remote, IndexNodes, length(IndexNodes)}
      end.
  
  