anchor.diff:  get_state([#member{node = Node0}|T], Node1, SetL2) when Node0 /= Node1 ->
       get_state(T, Node1, SetL2).
   
  -
  -%% %% @doc Retrieve a ring's list
  -%% %% @private
  -%% get_ring(Tbl, State) ->
  -%%     case Tbl of
  -%%         ?CUR_RING_TABLE  -> (State#state.cur )#routing_table.table;
  -%%         ?PREV_RING_TABLE -> (State#state.prev)#routing_table.table;
  -%%         _ ->
  -%%             []
  -%%     end.
  -
  -
  -%% %% @doc Retrieve index's list
  -%% %%      - [{rowid, addr-id}|...]
  -%% %% @private
  -%% get_index(Tbl, State) ->
  -%%     case Tbl of
  -%%         ?CUR_RING_TABLE  -> (State#state.cur )#routing_table.index;
  -%%         ?PREV_RING_TABLE -> (State#state.prev)#routing_table.index;
  -%%         _ ->
  -%%             []
  -%%     end.
  -
  -
  -%% %% @doc Retrieve vnode-id from a ring's list
  -%% %% @private
  -%% get_vnode_id(RowId, VNodeId, Ring) when RowId =< length(Ring) ->
  -%%     {_, Rest} = lists:split(RowId, Ring),
  -%%     get_vnode_id_1(VNodeId, Rest);
  -%% get_vnode_id(_,_,_) ->
  -%%     [].
  -
  -%% get_vnode_id_1(_VNodeId, []) ->
  -%%     [];
  -%% get_vnode_id_1(VNodeId, [{_, AddrId,_VNode, _}|_Rest] ) when VNodeId < AddrId ->
  -%%     [];
  -%% get_vnode_id_1(VNodeId, [{_, AddrId, VNode, _}|_Rest]) when VNodeId == AddrId ->
  -%%     VNode;
  -%% get_vnode_id_1(VNodeId, [{_, AddrId,_VNode, _}|Rest]) when VNodeId > AddrId ->
  -%%     get_vnode_id_1(VNodeId, Rest).
  -
  -
  -%% %% @doc Find index by vnode-id
  -%% %% @private
  -%% find_index(_VNodeId,[]) ->
  -%%     0;
  -%% find_index(VNodeId, [{RowId, Index}|_]) when VNodeId >= Index ->
  -%%     RowId - 1;
  -%% find_index(VNodeId, [_|Rest]) ->
  -%%     find_index(VNodeId, Rest).
  -
  -
  -%% %% @doc Find vnode-id by rowid and addrId
  -%% %% @private
  -%% next_vnode_id(RowId, VNodeId, Ring) when RowId =< length(Ring) ->
  -%%     {_, Rest} = lists:split(RowId, Ring),
  -%%     next_vnode_id_1(VNodeId, Rest);
  -%% next_vnode_id(_,_,_) ->
  -%%     '$end_of_table'.
  -
  -%% next_vnode_id_1(_VNodeId, []) ->
  -%%     '$end_of_table';
  -%% next_vnode_id_1(VNodeId, [{_, AddrId,_Node, _}|_]) when VNodeId < AddrId ->
  -%%     AddrId;
  -%% next_vnode_id_1(VNodeId, [_|Rest]) ->
  -%%     next_vnode_id_1(VNodeId, Rest).
  -
  -
  -%% %% @doc Find vnode-id by rowid and addrId
  -%% %% @private
  -%% prev_vnode_id(RowId, VNodeId, Ring) when RowId =< length(Ring) ->
  -%%     {Head, _Rest} = lists:split(RowId + 1, Ring),
  -%%     prev_vnode_id_1(VNodeId, lists:reverse(Head));
  -%% prev_vnode_id(_,_,_) ->
  -%%     '$end_of_table'.
  -
  -%% prev_vnode_id_1(_VNodeId, []) ->
  -%%     '$end_of_table';
  -%% prev_vnode_id_1(VNodeId, [{_, AddrId,_Node, _}|_]) when VNodeId > AddrId ->
  -%%     AddrId;
  -%% prev_vnode_id_1(VNodeId, [_|Rest]) ->
  -%%     prev_vnode_id_1(VNodeId, Rest).
  -
  
positive.code:     RingSize  = length(CurRing),
      GroupSize = leo_math:ceiling(RingSize / ?DEF_NUM_OF_DIV),
  
      {_,_,Index,Ring} =
          lists:foldl(
            fun({VNodeId, _Node}, {Id, GId, IdxAcc, TblAcc}) ->
                    case redundancies(ETS_Tbl, VNodeId, NumOfReplicas, NumOfAwarenessL2, Members) of
                        {ok, #redundancies{nodes = Nodes}} ->
                            case (GId == GroupSize) of
                                true  -> {Id - 1, 0,
                                          [{Id, VNodeId}|IdxAcc], [{Id, VNodeId, Nodes}|TblAcc]};
                                false -> {Id - 1, GId + 1,
                                          IdxAcc,                 [{Id, VNodeId, Nodes}|TblAcc]}
                            end
                    end
            end, {RingSize, 0, [], []}, lists:reverse(CurRing)),
      ?debugVal({Index,Ring}),
      {ok, {Checksum, lists:reverse(Index), length(Ring), Ring}}.
  
  
  %% @doc get redundancies by key.
  
negative.code:     N  = leo_misc:get_value(?PROP_N,  Options),
      L2 = leo_misc:get_value(?PROP_L2, Options, 0),
  
      {ok, {Checksum, RingGroupList}} =
          gen_routing_table(?SYNC_MODE_CUR_RING, N, L2, Members),
      NewState = State#state{cur = #ring_info{checksum = Checksum,
                                              ring_group_list = RingGroupList}},
      {reply, ok, NewState};
  handle_call({force_sync, {_, ?PREV_RING_TABLE}},_From, State) ->
      {ok, Members} = leo_redundant_manager_table_member:find_all(),
  