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:   {OldPos, _}  = barrel_doc:parse_revision(CurrentRev),
    {Idx, Parent} = find_parent(Revs, RevTree, 0),
    if
      Idx =:= 0 -> 
        {ok, DocInfo};
      true ->
        ToAdd = lists:sublist(Revs, Idx),
        RevTree2 = edit_revtree(lists:reverse(ToAdd), Parent, Doc#doc.deleted, RevTree),
    
        %% update docinfo
        DocInfo2 = DocInfo#{ local_seq := Seq + 1,
                             body_map => BodyMap#{ NewRev => Body },
  
negative.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
  