anchor.diff:  
   terminate_cleanup(State0) ->
       State = xdc_vbucket_rep_ckpt:cancel_timer(State0),
  -    Dbs = [State#rep_state.target,
  -           State#rep_state.src_master_db],
  +    Dbs = [State#rep_state.target],
       [catch couch_api_wrap:db_close(Db) || Db <- Dbs, Db /= undefined].
   
   
  
positive.code:     TgtDb = xdc_rep_utils:parse_rep_db(TgtURI, [], [{xdcr_cert, CertPEM} | Options]),
      {ok, Target} = couch_api_wrap:db_open(TgtDb, []),
  
      SrcMasterDb = capi_utils:must_open_master_vbucket(Src),
  
      XMemRemote = case RepMode of
                       "xmem" ->
                           {ok, #remote_node{host = RemoteHostName, memcached_port = Port} = RN, LatestRemoteBucket} =
  
negative.code:     %% check if we need do checkpointing, replicator will crash if checkpoint failure
      State1 = State#rep_state{
                 xmem_location = XMemLoc,
                 target = Target},
  
      {Succ, CkptErrReason, NewState} =
          case TimeSinceLastCkpt > IntervalSecs of
  