anchor.diff:            #user_ctx{roles = [<<"_admin">>]}),
       Replication.
   
  -
   start_server_replication(Master, Bucket, Node) ->
       Opts = build_replication_struct(remote_master_url(Bucket, Node), Master),
  -    {ok, Pid} = couch_replicator:async_replicate(Opts),
  -    erlang:monitor(process, Pid),
  -    ok.
  -
  +    case couch_replicator:async_replicate(Opts) of
  +        {ok, Pid} ->
  +            erlang:monitor(process, Pid),
  +            ok;
  +        Error ->
  +            Error
  +    end.
   
   stop_server_replication(Master, Bucket, Node) ->
       Opts = build_replication_struct(remote_master_url(Bucket, Node), Master),
  
positive.code: 
      proplists:get_value(servers, Conf) -- [Self].
  
  start_replication(#state{bucket=Bucket, master=Master} = State) ->
      Servers  = get_all_servers(Bucket),
      [start_server_replication(Master, Bucket, Srv) || Srv <- Servers],
      State#state{servers=Servers}.
  
  stop_replication(#state{bucket=Bucket, master=Master, servers=Servers} = State) ->
      [stop_server_replication(Master, Bucket, Srv) || Srv <- Servers],
      State#state{servers=[]}.
  
  update(#state{servers=Servers, bucket=Bucket, master=Master} = State) ->
      NServers = get_all_servers(Bucket),
  
      {ToStartServers, ToStopServers} = difference(Servers, NServers),
  
      [stop_server_replication(Master, Bucket, Srv) || Srv <- ToStopServers],
      [start_server_replication(Master, Bucket, Srv) || Srv <- ToStartServers],
      State#state{servers=NServers}.
  
  build_replication_struct(Source, Target) ->
      {ok, Replication} =
  
negative.code: -export([init/1, handle_call/3, handle_cast/2,
           handle_info/2, terminate/2, code_change/3]).
  
  -record(state, {bucket,
                  master,
                  servers = [],
                  retry_timer}).
  
  -define(RETRY_AFTER, 5000).
  
  start_link(Bucket) ->
      {ok, BucketConfig} = ns_bucket:get_bucket(Bucket),
  