anchor.diff:                      MergeAcc#merge_acc{crdt=CRDT2}
               end
       end.
  +
  +%% turns out, due to weirdness, it is possible to have two dots with
  +%% the same id and counter, but different timestamps (backup and
  +%% restore, riak_kv#679). In that case, it is possible to drop both
  +%% dots, as both are dominted, but not equal. Here we strip the
  +%% timestamp component when comparing dots.  This is bad as it _knows_
  +%% about the internal structure of the vclock entry.
  +%%
  +%% @see is_drop_candidate/2
  +add_drop_candidate({Id, {Cnt, _TS}}, Contents,  Dict) ->
  +    orddict:store({Id, Cnt}, Contents, Dict).
  +
  +%% compare dots by Id and Counter alone, so making equal "skewed dots"
  +is_drop_candidate({Id, {Cnt, _TS}}, Dict) ->
  +    orddict:is_key({Id, Cnt}, Dict).
  +
  +%% fetch a drop candidate by it's dot
  +get_drop_candidate({Id, {Cnt, _TS}}, Dict) ->
  +    orddict:fetch({Id, Cnt}, Dict).
   
   %% @private Transform a `merge_acc()' to a list of `r_content()'. The
   %% merge accumulator contains a list of non CRDT (opaque) sibling
  
positive.code:     #merge_acc{drop=Drop, keep=Keep, crdt=CRDT, error=Error} = MergeAcc,
      case get_dot(Dict) of
          {ok, Dot} ->
              case {vclock:descends_dot(Clock, Dot), orddict:is_key(Dot, Drop)} of
                  {true, true} ->
                      %% When the exact same dot is present in both
                      %% objects siblings, we keep that value. Without
                      %% this merging an object with itself would result
                      %% in an object with no values at all, since an
                      %% object's vector clock always dominates all its
                      %% dots.
                      Content = convert_to_dict_list(C0),
                      MergeAcc#merge_acc{keep=ordsets:add_element(Content, Keep)};
                  {true, false} ->
                      %% The `dot' is dominated by the other object's
                      %% vclock. This means that the other object has a
                      %% value that is the result of a PUT that
                      %% reconciled this sibling value, we can therefore
                      %% drop this value.
                      MergeAcc#merge_acc{drop=orddict:store(Dot, C0, Drop)};
                  {false, _} ->
                      %% The other object's vclock does not contain (or
                      %% dominate) this sibling's `dot'. That means this
  
negative.code:                 {CRDT, [], [E]} ->
                      %% An error occurred trying to merge this sibling
                      %% value. This means it was CRDT with some
                      %% corruption of the binary format, or maybe a
                      %% user's opaque binary that happens to match the
                      %% CRDT binary start tag. Either way, gather the
                      %% error for later logging.
  