anchor.diff:          couch_db:close(Db)
       end,
       case Result of
  -    {ok, Group2} ->
  +    {same, Group2} ->
  +        [Pid ! {self(), {ok, Group2}} || Pid <- NotifyPids],
  +        update_loop(RootDir, DbName, GroupId, Group2, get_notify_pids(100000));
  +    {updated, Group2} ->
           HeaderData = {Sig, get_index_header_data(Group2)},
           ok = couch_file:write_header(Fd, <<$r, $c, $k, 0>>, HeaderData),
           [Pid ! {self(), {ok, Group2}} || Pid <- NotifyPids],
  
positive.code: 
  temp_update_loop(DbName, Group, NotifyPids) ->
      {ok, Db} = couch_db:open(DbName, []),
      {ok, Group2} = update_group(Group#group{db=Db}),
      couch_db:close(Db),
      [Pid ! {self(), {ok, Group2}} || Pid <- NotifyPids],
      garbage_collect(),
  
negative.code:     couch_query_servers:stop_doc_map(Group4#group.query_server),
      if CurrentSeq /= NewSeq ->
          {ok, Group5} = write_changes(Group4, ViewKVsToAdd2, DocIdViewIdKeys2, NewSeq),
          {updated, Group5#group{query_server=nil}};
      true ->
          {same, Group4#group{query_server=nil}}
      end.
      
  delete_index_dir(RootDir, DbName) ->
  