anchor.diff:                  fun({change, Change, _}, _) ->
                       case has_valid_rep_id(Change) of
                       true ->
  -                        couch_work_queue:queue(ChangesQueue, Change);
  +                        ok = gen_server:call(
  +                            Server, {rep_db_update, Change}, infinity);
                       false ->
                           ok
                       end;
  
positive.code: 
  init(_) ->
      process_flag(trap_exit, true),
      {ok, Queue} = couch_work_queue:new(
          [{max_size, 1024 * 1024}, {max_items, 1000}]),
      {ok, Processor} = changes_processor(Queue),
      {ok, Loop} = changes_feed_loop(Queue),
      Server = self(),
      ok = couch_config:register(
          fun("replicator", "db") ->
              ok = gen_server:cast(Server, rep_db_changed)
          end
      ),
      {ok, #state{
          changes_feed_loop = Loop,
          changes_queue = Queue,
          changes_processor = Processor,
          db_notifier = db_update_notifier()}
      }.
  
  
  handle_call(Msg, From, State) ->
      ?LOG_ERROR("Replicator DB listener received unexpected call ~p from ~p",
  
negative.code:         end
      ),
      couch_db:close(RepDb),
      {Pid, couch_db:name(RepDb)}.
  
  
  has_valid_rep_id({Change}) ->
      has_valid_rep_id(get_value(<<"id">>, Change));
  has_valid_rep_id(<<?DESIGN_DOC_PREFIX, _Rest/binary>>) ->
      false;
  has_valid_rep_id(_Else) ->
      true.
  
  
  db_update_notifier() ->
  