anchor.diff:          end,
       {ok, Target} = couch_api_wrap:db_open(TgtDB, []),
   
  -    SrcMasterDb = capi_utils:must_open_master_vbucket(SourceBucket),
  -
       {ok, ChangesQueue} = couch_work_queue:new([
                                                  {max_items, BatchSizeItems * NumWorkers * 2},
                                                  {max_size, 100 * 1024 * NumWorkers}
  
positive.code: 
  terminate_cleanup(State0) ->
      State = xdc_vbucket_rep_ckpt:cancel_timer(State0),
      Dbs = [State#rep_state.target,
             State#rep_state.src_master_db],
      [catch couch_api_wrap:db_close(Db) || Db <- Dbs, Db /= undefined].
  
  
  
negative.code:             NewState = State2#rep_state{
                           workers = [],
                           status = VbStatus3,
                           target = undefined,
                           current_through_snapshot_seq = NewSnapshotSeq,
                           current_through_snapshot_end_seq = NewSnapshotEndSeq},
  