anchor.diff:  %% We do a no-op here rather than filtering these out so that the
   %% replication update will still work properly.
   mover(Parent, Bucket, VBucket, [undefined | _] = OldChain, [NewNode | _] = NewChain, _) ->
  -    ok = janitor_agent:set_vbucket_state(Bucket, NewNode, Parent, VBucket, active, undefined, undefined),
  +    set_vbucket_state(Bucket, NewNode, Parent, VBucket, active, undefined, undefined),
       Parent ! {move_done, {VBucket, OldChain, NewChain}};
   
   mover(Parent, Bucket, VBucket, OldChain, NewChain, ReplType) ->
  
positive.code:     if
          Node =:= NewNode ->
              %% if there's nothing to move, we're done
              ok = janitor_agent:set_vbucket_state(Bucket, NewNode, Parent, VBucket, active, undefined, undefined);
          true ->
              ok = run_mover(Bucket, VBucket, Node, NewNode),
              ok = janitor_agent:set_vbucket_state(Bucket, NewNode, Parent, VBucket, active, undefined, undefined),
              ok
      end.
  
  
negative.code:             end,
  
              master_activity_events:note_takeover_started(Bucket, VBucket, OldMaster, NewMaster),
              upr_takeover(Bucket, Parent, OldMaster, NewMaster, VBucket),
              master_activity_events:note_takeover_ended(Bucket, VBucket, OldMaster, NewMaster)
      end,
  
      %% set new master to active state
      set_vbucket_state(Bucket, NewMaster, Parent, VBucket, active,
                        undefined, undefined).
  
  set_vbucket_state(Bucket, Node, RebalancerPid, VBucket,
                    VBucketState, VBucketRebalanceState, ReplicateFrom) ->
      spawn_and_wait(
        fun () ->
                ok = janitor_agent:set_vbucket_state(Bucket, Node, RebalancerPid, VBucket,
                                                     VBucketState, VBucketRebalanceState, ReplicateFrom)
        end).
  
  upr_takeover(Bucket, Parent, OldMaster, NewMaster, VBucket) ->
      spawn_and_wait(
        fun () ->
                ok = janitor_agent:upr_takeover(Bucket, Parent, OldMaster, NewMaster, VBucket)
        end).
  
  wait_upr_data_move(Bucket, Parent, SrcNode, DstNodes, VBucket) ->
      spawn_and_wait(
  