anchor.diff:          check_ring_data_lock_free(Data, FailOnError) andalso
           check_ring_data_repl_exist(Data, FailOnError).
   
  --spec check_ring_data_unique(Data::[db_entry:entry()], FailOnError::boolean()) -> ok.
  +-spec check_ring_data_unique(Data::[db_entry:entry()], FailOnError::boolean()) -> boolean().
   check_ring_data_unique(Data, FailOnError) ->
       UniqueData = lists:usort(fun(A, B) ->
                                        db_entry:get_key(A) =< db_entry:get_key(B)
  
positive.code:     DataDiff = lists:subtract(Data, UniqueData),
      case FailOnError of
          true ->
              ?equals_w_note(DataDiff, [], "duplicate elements detected");
          _ when DataDiff =:= [] ->
              true;
          _ ->
  
negative.code:             false
      end.
  
  -spec check_ring_data_repl_exist(Data::[db_entry:entry()], FailOnError::boolean()) -> boolean().
  check_ring_data_repl_exist(Data, FailOnError) ->
      ElementsNotAllReplicas =
          [E || E <- Data, not data_contains_all_replicas(Data, db_entry:get_key(E))],
      case FailOnError of
          true ->
              ?equals_w_note(ElementsNotAllReplicas, [], "missing replicas found"),
              true;
          _ when ElementsNotAllReplicas =:= [] ->
              true;
          _ ->
  