anchor.diff:              true ->
                   ok;
               false ->
  -                maybe_compact_views(DbName, DDocNames, Config)
  +                maybe_compact_views(DbName, MasterDbName, DDocNames, Config)
               end;
           {'DOWN', DbMonRef, process, _, Reason} ->
               couch_db:close(Db),
  
positive.code:     DDocNames.
  
  
  maybe_compact_view(DbName, GroupId, Config) ->
      DDocId = <<"_design/", GroupId/binary>>,
      case (catch couch_view:get_group_info(DbName, DDocId)) of
      {ok, GroupInfo} ->
          case can_view_compact(Config, DbName, GroupId, GroupInfo) of
          true ->
              {ok, CompactPid} = couch_view_compactor:start_compact(DbName, GroupId),
              TimeLeft = compact_time_left(Config),
              MonRef = erlang:monitor(process, CompactPid),
              receive
  
negative.code:     end.
  
  
  maybe_compact_views(_DbName, _MasterDbName, [], _Config) ->
      ok;
  maybe_compact_views(DbName, MasterDbName, [DDocName | Rest], Config) ->
      case maybe_compact_view(DbName, MasterDbName, DDocName, Config) of
      ok ->
          maybe_compact_views(DbName, MasterDbName, Rest, Config);
      timeout ->
          ok
      end.
  