anchor.diff:  -include("couch_db.hrl").
   
   %% API
  --export([start_link/0]).
  +-export([start_link/0,
  +         inhibit_view_compaction/2, uninhibit_view_compaction/2]).
   
   %% gen_server callbacks
   -export([init/1, handle_call/3, handle_cast/2,
  
positive.code:                                       compactor_pid=undefined,
                                        compactor_fun=Fun} = State) ->
      true = [] =/= Buckets,
  
      NextBucket = hd(Buckets),
  
      {InitialConfig, _ConfigProps} = Configs = compaction_config(NextBucket),
  
      Compactor = Fun(NextBucket, Configs),
      State#compaction_state{compactor_pid = Compactor,
                             compactor_config = InitialConfig}.
  
  db_name(BucketName, SubName) when is_list(SubName) ->
      db_name(BucketName, list_to_binary(SubName));
  
negative.code: 
  -record(state, {kv_compaction :: #compaction_state{},
                  views_compaction :: #compaction_state{},
  
                  %% bucket for which view compaction is inhibited (note
                  %% it's also set when we're running 'uninhibit' views
                  %% compaction as 'final stage')
                  view_compaction_inhibited_bucket :: undefined | binary(),
                  %% if view compaction is inhibited this field will
                  %% hold monitor ref of the guy who requested it. If
                  %% that guy dies, inhibition will be canceled
                  view_compaction_inhibited_ref :: (undefined | reference()),
                  %% when we have 'uninhibit' request, we're starting
                  %% our compaction with 'forced' view compaction asap
                  %%
                  %% requested indicates we have this request
                  view_compaction_uninhibit_requested = false :: boolean(),
                  %% started indicates we have started such compaction
                  %% and waiting for it to complete
                  view_compaction_uninhibit_started = false :: boolean(),
                  %% this is From to reply to when such compaction is
                  %% done
                  view_compaction_uninhibit_requested_waiter,
  
                  %% mapping from compactor pid to #forced_compaction{}
                  running_forced_compactions,
                  %% reverse mapping from #forced_compaction{} to compactor pid
  