anchor.diff:      end.
   
   apply_changes(Bucket, ChangeTuples) ->
  +    AffectedNodes = lists:usort([S || {_, S, _, _} <- 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),
  +    NodeChildrens = misc:parallel_map(
  +                      fun (Node) ->
  +                              Children = try children(Node, Bucket) catch _:_ -> [] end,
  +                              {Node, Children}
  +                      end, AffectedNodes, infinity),
       ReplicatorsList =
           lists:flatmap(
  -          fun (Node) ->
  -                  Children = try children(Node, Bucket) catch _:_ -> [] end,
  +          fun ({Node, Children}) ->
                     [{{Node, Dst}, lists:sort(VBuckets)}
                      || #child_id{vbuckets=VBuckets, dest_node=Dst} <- Children]
  -          end, RelevantSrcNodes),
  +          end, NodeChildrens),
       Replicators = dict:from_list(ReplicatorsList),
       NewReplicators =
           lists:foldl(fun ({Type, SrcNode, DstNode, VBucket}, CurrentReplicators) ->
  
positive.code:       end, Nodes).
  
  set_replicas(Bucket, NodesReplicas) ->
      %% Replace with the empty list if replication is disabled
      NR = case ns_config:search_node_prop(node(), ns_config:get(), replication,
                                      enabled, true) of
  
negative.code:                             end
                      end, 0, Replicators),
      NewReplicasList = dict:to_list(NewReplicas),
      set_replicas_on_nodes(Bucket, NewReplicasList, AffectedNodes),
      ActualChangesCount.
  
  replicators(Nodes, Bucket) ->
      lists:flatmap(
  