anchor.diff:  
   % public API
   -export([replication_started/1, replication_completed/2, replication_error/2]).
  +-export([owner/1]).
   
   -export([before_doc_update/2, after_doc_read/2]).
   
  
positive.code: owner(<<"shards/", _/binary>> = DbName, DocId, Live) ->
      Nodes = lists:sort([N || #shard{node=N} <- mem3:shards(mem3:dbname(DbName), DocId),
  			     lists:member(N, Live)]),
      node() =:= hd(mem3_util:rotate_list({DbName, DocId}, Nodes));
  owner(_DbName, _DocId, _Live) ->
      true.
  
  rep_db_update_error(Error, DbName, DocId) ->
      case Error of
  
negative.code:         live = Live
      }}.
  
  handle_call({owner, RepId}, _From, State) ->
      case rep_state(RepId) of
      nil ->
          false;
      #rep_state{dbname = DbName, rep = #rep{doc_id = DocId}} ->
          {reply, owner(DbName, DocId, State#state.live), State}
      end;
  
  handle_call({rep_db_update, DbName, {ChangeProps} = Change}, _From, State) ->
      NewState = try
  