anchor.diff:                   NodesReplicas;
                false -> []
            end,
  -    LiveNodes = ns_node_disco:nodes_actual_proper(),
       %% Kill all replicators on nodes not in NR
       NodesWithoutReplicas = LiveNodes -- [N || {N, _} <- NR],
       lists:foreach(fun (Node) -> kill_all_children(Node, Bucket) end,
  
positive.code:     end.
  
  apply_changes(Bucket, ChangeTuples) ->
      ?log_debug("Applying changes:~n~p~n", [ChangeTuples]),
      {ok, BucketConfig} = ns_bucket:get_bucket(Bucket),
      RelevantSrcNodes = proplists:get_value(servers, BucketConfig),
      true = (undefined =/= RelevantSrcNodes),
      ReplicatorsList =
          lists:flatmap(
            fun (Node) ->
                    Children = try children(Node, Bucket) catch _:_ -> [] end,
                    [{{Node, Dst}, lists:sort(VBuckets)}
                     || #child_id{vbuckets=VBuckets, dest_node=Dst} <- Children]
            end, RelevantSrcNodes),
      Replicators = dict:from_list(ReplicatorsList),
      NewReplicators =
          lists:foldl(fun ({Type, SrcNode, DstNode, VBucket}, CurrentReplicators) ->
  
negative.code:                             end
                      end, 0, Replicators),
      NewReplicasList = dict:to_list(NewReplicas),
      set_replicas_on_nodes(Bucket, NewReplicasList, AffectedNodes),
      ActualChangesCount.
  
  replicators(Nodes, Bucket) ->
      lists:flatmap(
  