anchor.diff:                                     type    = ErrorType} ->
               case correct_redundancies(Key) of
                   ok ->
  -                    ok;
  -                {error, not_found} ->
                       ok;
                   {error, Cause} ->
                       publish(?QUEUE_TYPE_PER_OBJECT, AddrId, Key, ErrorType),
  
positive.code: -spec(correct_redundancies(binary()) ->
               ok | {error, any()}).
  correct_redundancies(Key) ->
      {ok, #redundancies{nodes = Redundancies,
                         id    = AddrId}} = leo_redundant_manager_api:get_redundancies_by_key(Key),
      Redundancies_1 = get_redundancies_with_replicas(
                         AddrId, Key, Redundancies),
      correct_redundancies_1(Key, AddrId, Redundancies_1, [], []).
  
  %% correct_redundancies_1/5 - next.
  %%
  -spec(correct_redundancies_1(binary(), integer(), list(), list(), list()) ->
               ok | {error, any()}).
  correct_redundancies_1(_Key,_AddrId, [], [], _ErrorNodes) ->
      {error, not_found};
  
  correct_redundancies_1(_Key,_AddrId, [], Metadatas, ErrorNodes) ->
      correct_redundancies_2(Metadatas, ErrorNodes);
  
negative.code: -spec(correct_redundancies_2(list(), list()) ->
               ok | {error, any()}).
  correct_redundancies_2(ListOfMetadata, ErrorNodes) ->
      [{_Node, Metadata} = H|_] =
          lists:sort(fun({_, M1}, {_, M2}) ->
                             M1#?METADATA.clock >= M2#?METADATA.clock;
                        (_,_) ->
                             false
                     end, ListOfMetadata),
  
      {_Dest, CorrectNodes, InconsistentNodes} =
          lists:foldl(
            fun({Node,_Metadata}, {{DestNode, _Metadata} = Dest, C, R}) when Node =:= DestNode ->
                    {Dest, [Node|C], R};
               ({Node, #?METADATA{clock = Clock}}, {{DestNode, #?METADATA{clock = DestClock}} = Dest, C, R}) when Node  =/= DestNode,
                                                                                                                  Clock =:= DestClock ->
                    {Dest, [Node|C], R};
               ({Node, #?METADATA{clock = Clock}}, {{DestNode, #?METADATA{clock = DestClock}} = Dest, C, R}) when Node  =/= DestNode,
                                                                                                                  Clock =/= DestClock ->
                    {Dest, C, [Node|R]}
            end, {H, [], []}, ListOfMetadata),
      correct_redundancies_3(ErrorNodes ++ InconsistentNodes, CorrectNodes, Metadata).
  