anchor.diff:                                    {line, Line}, {body, Msg}])).
   -endif.
   
  +-compile({inline, [lookup_fun/4, find_redundancies_by_addr_id/2,
  +                   reply_redundancies/2,first_fun/1, last_fun/1,
  +                   gen_routing_table/4, gen_routing_table_1/8,
  +                   redundancies/5, redundnacies_1/6, redundnacies_1/7,
  +                   redundancies_2/6, redundancies_3/7, get_node_by_vnodeid/2,
  +                   get_redundancies/3
  +                  ]}).
   
   %%--------------------------------------------------------------------
   %% API
  
positive.code:         _ ->
              State
      end.
  
negative.code:                                                      Tbl /= ?PREV_RING_TABLE ->
      {reply, {error, invalid_table}, State};
  
  handle_call({lookup, Tbl, AddrId},_From, State) ->
      #ring_info{ring_group_list = RingGroupList,
                 first_vnode_id  = FirstVNodeId,
                 last_vnode_id   = LastVNodeId} = ring_info(Tbl, State),
      Reply = lookup_fun(RingGroupList, FirstVNodeId, LastVNodeId, AddrId),
      {reply, Reply, State};
  
  
  handle_call({first, Tbl},_From, State) when Tbl /= ?CUR_RING_TABLE,
                                              Tbl /= ?PREV_RING_TABLE ->
      {reply, {error, invalid_table}, State};
  handle_call({first, Tbl},_From, State) ->
      #ring_info{ring_group_list = RingGroupList} = ring_info(Tbl, State),
      Reply = first_fun(RingGroupList),
      {reply, Reply, State};
  
  
  handle_call({last, Tbl},_From, State) when Tbl /= ?CUR_RING_TABLE,
                                             Tbl /= ?PREV_RING_TABLE ->
      {reply, {error, invalid_table}, State};
  handle_call({last, Tbl},_From, State) ->
      #ring_info{ring_group_list = RingGroupList} = ring_info(Tbl, State),
      Reply = last_fun(RingGroupList),
      {reply, Reply, State};
  
  
  