anchor.diff:              {<<"_replication_id">>, ?l2b(BaseId)}]),
           ok = gen_server:call(?MODULE, {rep_error, RepId, Error}, infinity)
       end.
  +
  +
  +owner(RepId) ->
  +    gen_server:call(?MODULE, {owner, RepId}).
   
   
   handle_config_change("replicator", "db", _, _, S) ->
  
positive.code: 
  % public API
  -export([replication_started/1, replication_completed/2, replication_error/2]).
  
  -export([before_doc_update/2, after_doc_read/2]).
  
  
negative.code: owner(<<"shards/", _/binary>> = DbName, DocId, Live) ->
      Nodes = lists:sort([N || #shard{node=N} <- mem3:shards(mem3:dbname(DbName), DocId),
  			     lists:member(N, Live)]),
      hd(mem3_util:rotate_list({DbName, DocId}, Nodes));
  owner(_DbName, _DocId, _Live) ->
      node().
  
  rep_db_update_error(Error, DbName, DocId) ->
      case Error of
  