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:             %% alive. Eventually we will get a notification from master db
              %% watcher and delete it from a list of design documents.
              ok;
          throw:{error, view_undefined} ->
              %% see below
              ok;
          throw:view_undefined ->
              %% Design document has been updated but we have not reacted on it
              %% yet. Eventually we will get a notification about
              %% this change and define a group again.
              ok
      end.
  
  master_db_watcher(Bucket, Parent) ->
  
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,
  