anchor.diff:  -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
            terminate/2, code_change/3]).
   
  --record(state, {running,diffs,partitions=[],parts_for_node=[]}).
  +-record(state, {running,
  +                diffs,
  +                partitions=[],
  +                parts_for_node=[]}).
   
   -include_lib("eunit/include/eunit.hrl").
   
  
positive.code:               permanent, 1000, worker, [sync_server]},
        case supervisor:start_child(sync_server_sup, Spec) of
          already_present -> supervisor:restart_child(sync_server_sup, Name);
          _ -> ok
        end
      end, NewParts).
  
  
negative.code: handle_call(diffs, _From, State = #state{diffs=Diffs}) ->
    {reply, Diffs, State};
  
  handle_call({load, _Nodes, NewPartitions, NewPartsForNode}, _From,
              State = #state{partitions=_OldPartitions,
                             parts_for_node=OldPartsForNode}) ->
    NewPartitions1 = lists:filter(fun (E) ->
                                      not lists:member(E, OldPartsForNode)
                                  end, NewPartsForNode),
    OldPartitions1 = lists:filter(fun (E) ->
                                      not lists:member(E, NewPartsForNode)
                                  end, OldPartsForNode),
    reload_sync_servers(OldPartitions1, NewPartitions1),
    {reply, ok, State#state{partitions=NewPartitions,
                            parts_for_node=NewPartsForNode}}.
  
  handle_cast({sync, Part, Master, NodeA, NodeB, DiffSize},
              State = #state{running=Running,
                             diffs=Diffs}) ->
    NewDiffs = store_diff(Part, Master, NodeA, NodeB, DiffSize, Diffs),
    NewRunning = lists:keysort(1, lists:keystore(Part, 1, Running,
                                                 {Part, NodeA, NodeB})),
  