anchor.diff:              {Frag, SpaceRequired} = frag(GroupInfo),
               ?LOG_DEBUG("Fragmentation for view group `~s` (database `~s`) is "
                   "~p%, estimated space for compaction is ~p bytes.",
  -                [GroupId, Db#db.name, Frag, SpaceRequired]),
  +                [GroupId, DbName, Frag, SpaceRequired]),
               case check_frag(Config#config.view_frag, Frag) of
               false ->
                   false;
  
positive.code:         end
      end.
  
  can_view_compact(Config, Db, GroupId, GroupInfo) ->
      case check_period(Config) of
      false ->
          false;
  
negative.code:             {'DOWN', MonRef, process, CompactPid, Reason} ->
                  ?LOG_ERROR("Compaction daemon - an error ocurred while compacting"
                      " the view group `~s` from database `~s`: ~p",
                      [GroupId, DbName, Reason]),
                  ok
              after TimeLeft ->
                  ?LOG_INFO("Compaction daemon - canceling the compaction for the "
                      "view group `~s` of the database `~s` because it's exceeding"
                      " the allowed period.", [GroupId, DbName]),
                  erlang:demonitor(MonRef, [flush]),
                  ok = couch_view_compactor:cancel_compact(DbName, GroupId),
                  timeout
              end;
          false ->
              ok
          end;
      Error ->
          ?LOG_ERROR("Error opening view group `~s` from database `~s`: ~p",
              [GroupId, DbName, Error]),
          ok
      end.
  
  