anchor.diff:                DDocNames =/= [] orelse exit(normal),
   
                 Compactors = get_view_compactors(BucketName, DDocNames, Config, false),
  +              misc:wait_for_process(chain_compactors(Compactors), infinity)
  +      end).
  +
  +-spec spawn_views_compactor_for_paused_bucket(binary(), {#config{}, list()}) -> pid().
  +spawn_views_compactor_for_paused_bucket(BucketName, {Config, ConfigProps}) ->
  +    proc_lib:spawn_link(
  +      fun () ->
  +              exit_if_no_bucket(BucketName),
  +
  +              try_to_cleanup_indexes(BucketName),
  +
  +              ?log_info("Start compaction of indexes for paused bucket ~s with config: ~n~p",
  +                        [BucketName, ConfigProps]),
  +
  +              DDocNames = ddoc_names(BucketName),
  +              DDocNames =/= [] orelse exit(normal),
  +
  +              %% for non-parallel view compaction grab token here and set Force=true
  +              %% for docs compactors to prevent kv compaction from interrupting us
  +              %% between docs
  +              Config#config.parallel_view_compact orelse get_kv_token(),
  +
  +              Compactors = get_view_compactors(BucketName, DDocNames, Config, true),
                 misc:wait_for_process(chain_compactors(Compactors), infinity)
         end).
   
  
positive.code:     Name = <<Bucket/binary, $/, DDocId/binary>>,
      Compaction = #forced_compaction{type=view, name=Name},
      {reply, ok, maybe_cancel_compaction(Compaction, State)};
  handle_call(Event, _From, State) ->
      ?log_warning("Got unexpected call ~p:~n~p", [Event, State]),
      {reply, ok, State}.
  
negative.code: handle_info(compact_views, #state{views_compaction=CompactionState} = State) ->
      {noreply, State#state{views_compaction=
                                process_scheduler_message(CompactionState)}};
  handle_info({'DOWN', MRef, _, _, _}, #state{view_compaction_inhibited_ref=MRef,
                                              view_compaction_inhibited_bucket=BinBucket}=State) ->
      ?log_debug("Looks like vbucket mover inhibiting view compaction for for bucket \"~s\" is dead."
                 " Canceling inhibition", [BinBucket]),
      {noreply, State#state{view_compaction_inhibited_ref = undefined,
                            view_compaction_inhibited_bucket = undefined}};
  handle_info({'EXIT', Compactor, Reason},
              #state{kv_compaction=#compaction_state{compactor_pid=Compactor}=
                         CompactorState} = State) ->
      log_compactors_exit(Reason, CompactorState),
      {noreply, State#state{kv_compaction=
                                process_compactors_exit(Reason, CompactorState)}};
  handle_info({'EXIT', Compactor, Reason},
              #state{views_compaction=#compaction_state{compactor_pid = Compactor,
                                                        buckets_to_compact = Buckets} =
                         CompactorState} = State) ->
      log_compactors_exit(Reason, CompactorState),
  
      NewState = case (Buckets =:= [State#state.view_compaction_inhibited_bucket]
                       andalso State#state.view_compaction_uninhibit_started) of
                     true ->
                         gen_server:reply(State#state.view_compaction_uninhibit_requested_waiter, ok),
                         State#state{view_compaction_inhibited_bucket = undefined,
                                     view_compaction_uninhibit_requested_waiter = undefined,
                                     view_compaction_uninhibit_requested = false,
                                     view_compaction_uninhibit_started = false};
                     _ ->
                         State
                 end,
  
      case NewState#state.view_compaction_uninhibit_requested andalso
          not NewState#state.view_compaction_uninhibit_started of
          true ->
              {noreply,
               NewState#state{view_compaction_uninhibit_started = true,
                              views_compaction =
                                  compact_views_for_paused_bucket(
                                    NewState#state.view_compaction_inhibited_bucket,
                                    CompactorState)}};
          false ->
              {noreply, NewState#state{views_compaction=
                                           process_compactors_exit(Reason, CompactorState)}}
      end;
  handle_info({'EXIT', Pid, Reason},
              #state{running_forced_compactions=Compactions} = State) ->
      case dict:find(Pid, Compactions) of
  