anchor.diff:      {ok, NewFd} = couch_file:open(CompactFilepath),
       {ok, NewHeader} = couch_file:read_header(NewFd, ?HEADER_SIG),
       #db{update_seq=NewSeq} = NewDb =
  -            init_db(Db#db.name, CompactFilepath, NewFd, NewHeader),
  +            init_db(Db#db.name, Filepath, NewFd, NewHeader),
  +    unlink(NewFd),
       case Db#db.update_seq == NewSeq of
       true ->
           % suck up all the local docs into memory and write them to the new db
  
positive.code:         ?LOG_INFO("Compaction file still behind main file "
              "(update seq=~p. compact update seq=~p). Retrying.",
              [Db#db.update_seq, NewSeq]),
          couch_file:close(NewFd),
          Pid = spawn_link(fun() -> start_copy_compact(Db) end),
          Db2 = Db#db{compactor_pid=Pid},
          {noreply, Db2}
  
negative.code:         revs_limit = Header#db_header.revs_limit
          }.
  
  
  close_db(#db{ fd_ref_counter = RefCntr, summary_stream = SummaryStream}) ->
      couch_stream:close(SummaryStream),
      couch_ref_counter:drop(RefCntr).
      
  
  refresh_validate_doc_funs(Db) ->
      {ok, DesignDocs} = get_design_docs(Db),
  