anchor.diff:          process_update(State, DbName, Change)
       catch
       _Tag:Error ->
  -        {RepProps} = get_value(doc, ChangeProps),
  -        DocId = get_value(<<"_id">>, RepProps),
  +        {RepProps} = get_json_value(doc, ChangeProps),
  +        DocId = get_json_value(<<"_id">>, RepProps),
           rep_db_update_error(Error, DbName, DocId),
           State
       end,
  
positive.code:     rescan(State#state{scan_pid = nil}).
  
  process_update(State, DbName, {Change}) ->
      {RepProps} = JsonRepDoc = get_value(doc, Change),
      DocId = get_value(<<"_id">>, RepProps),
      case {mem3_util:owner(DbName, DocId), get_value(deleted, Change, false)} of
      {false, _} ->
          replication_complete(DbName, DocId),
          State;
  
negative.code:                 }
              )
          end),
      Pid;
  changes_feed_loop(DbName, Since) ->
      ensure_rep_db_exists(DbName),
      Server = self(),
      spawn_link(fun() ->
          UserCtx = #user_ctx{roles = [<<"_admin">>, <<"_replicator">>]},
          DbOpenOptions = [{user_ctx, UserCtx}, sys_db],
          {ok, Db} = couch_db:open_int(DbName, DbOpenOptions),
          ChangesFeedFun = couch_changes:handle_changes(
              #changes_args{
                  include_docs = true,
                  since = Since,
                  feed = "continuous",
                  timeout = infinity
              },
              {json_req, null},
              Db
          ),
          EnumFun = fun
          ({change, Change, _}, _) ->
              case has_valid_rep_id(Change) of
                  true ->
                      Msg = {rep_db_update, DbName, Change},
                      ok = gen_server:call(Server, Msg, infinity);
                  false ->
                      ok
              end;
          (_, _) ->
              ok
          end,
          ChangesFeedFun(EnumFun)
      end).
  
  
  has_valid_rep_id({Change}) ->
      has_valid_rep_id(get_json_value(<<"id">>, Change));
  has_valid_rep_id(<<?DESIGN_DOC_PREFIX, _Rest/binary>>) ->
      false;
  has_valid_rep_id(_Else) ->
  