anchor.diff:                      end
                   end,
                   {0, []}, couch_util:get_value(map, Config)),
  -            {VbNames, bucket_compact_config(?l2b(Name))}
  +            NameBin = ?l2b(Name),
  +            {NameBin, VbNames, bucket_compact_config(NameBin)}
           end,
           ns_bucket:get_buckets()),
       lists:foreach(
  -        fun({_VbNames, nil}) ->
  +        fun({_BucketName, _VbNames, nil}) ->
               ok;
  -        ({VbNames, {ok, Config}}) ->
  -            maybe_compact_bucket(VbNames, Config)
  +        ({BucketName, VbNames, {ok, Config}}) ->
  +            MasterDbName = <<BucketName/binary, "/master">>,
  +            maybe_compact_bucket(MasterDbName, VbNames, Config)
           end,
           Buckets),
       case ets:info(?CONFIG_ETS, size) =:= 0 of
  
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:             true ->
                  ok;
              false ->
                  maybe_compact_views(DbName, MasterDbName, DDocNames, Config)
              end;
          {'DOWN', DbMonRef, process, _, Reason} ->
              couch_db:close(Db),
  