anchor.diff:    case barrel_store:whereis_db(DbName) of
       undefined -> {error, not_found};
       Db = #db{pid=DbPid} ->
  -      
  +
         {DocBuckets, Ref, Async, N} = barrel_write_batch:to_buckets(Batch),
         MRef = erlang:monitor(process, DbPid),
         DbPid ! {update_docs, DocBuckets},
  
positive.code:       %% find winning revision and update doc infos with it
        {WinningRev, Branched, Conflict} = barrel_revtree:winning_revision(RevTree2),
        {NewPos, _}  = barrel_doc:parse_revision(WinningRev),
    
        %% if the new winning revision is at the same position we keep the current
        %% one as winner. Else we update the doc info.
        if
  
negative.code:       WithHistory = proplists:get_value(history, Options, false),
        MaxHistory = proplists:get_value(max_history, Options, ?IMAX1),
        Ancestors = proplists:get_value(ancestors, Options, []),
        get_doc1(Db, DocId, Rev, WithHistory, MaxHistory, Ancestors, [])
    end.
  
  get_doc1(Db, DocId, Rev, WithHistory, MaxHistory, Ancestors, ReadOptions) ->
  