anchor.diff:  master_db(Bucket) ->
       list_to_binary(Bucket ++ "/master").
   
  -define_group(DDocId, #state{bucket = Bucket,
  -                            num_vbuckets = NumVBuckets,
  -                            use_replica_index = UseReplicaIndex} = _State) ->
  +maybe_define_group(DDocId,
  +                   #state{bucket = Bucket,
  +                          num_vbuckets = NumVBuckets,
  +                          use_replica_index = UseReplicaIndex} = _State) ->
       SetName = list_to_binary(Bucket),
       Params = #set_view_params{max_partitions=NumVBuckets,
                                 active_partitions=[],
  
positive.code:             %% The document has been deleted but we still think it's
              %% alive. Eventually we will get a notification from master db
              %% watcher and delete it from a list of design documents.
              ok
      end.
  
  maybe_define_group(DDocId, State) ->
      try
          define_group(DDocId, State),
          ok
      catch
          throw:view_already_defined ->
              already_defined
      end.
  
  apply_index_states(SetName, DDocId, Active, Passive, Cleanup,
                     Replica, ReplicaCleanup, PauseVBuckets, UnpauseVBuckets, UseReplicaIndex) ->
  
      try
          PausingOn = cluster_compat_mode:is_index_pausing_on(),
  
negative.code: 
  handle_call({delete_vbucket, VBucket}, _From, #state{bucket = Bucket,
                                                       wanted_states = [],
                                                       rebalance_states = RebalanceStates} = State) ->
      [] = RebalanceStates,
      ?log_info("Deleting vbucket ~p from all indexes", [VBucket]),
      SetName = list_to_binary(Bucket),
      do_apply_vbucket_states(SetName, [], [], [VBucket], [], [VBucket], [], [], State),
      {reply, ok, State};
  handle_call({delete_vbucket, VBucket}, _From, #state{usable_vbuckets = UsableVBuckets,
                                                       wanted_states = WantedStates,
  