anchor.diff:      rebalance_2(Tbl, T).
   
   %% @private
  -rebalance_3(_, [],
  -            #rebalance_proc_info{members_cur = Members} = RebalanceProcInfo) ->
  +rebalance_3([], #rebalance_proc_info{members_cur = Members} = RebalanceProcInfo) ->
       rebalance_4(Members, RebalanceProcInfo, []);
   
  -rebalance_3(?STATE_ATTACHED, [Node|Rest],
  +rebalance_3([{?STATE_ATTACHED, Node}|Rest],
               #rebalance_proc_info{members_cur = Members,
                                    system_conf = SystemConf} = RebalanceProcInfo) ->
       %% send a launch-message to a remote storage node
  
positive.code: 
              case rpc:multicall(DestNodes, leo_redundant_manager_api, update_members,
                                 [Members], ?DEF_TIMEOUT) of
                  {_, []} ->
                      void;
                  {_, BadNodes} ->
                      ?error("distribute_members/2", "bad-nodes:~p", [BadNodes])
              end,
              ok;
  
negative.code: rebalance() ->
      case leo_redundant_manager_api:get_members() of
          {ok, Members_1} ->
              {State, Nodes} =
                  lists:foldl(
                    fun(#member{state = ?STATE_RUNNING },{false, AccN}) ->
                            {true, AccN};
                       (#member{node  = Node,
                                state = ?STATE_ATTACHED},{SoFar, [{?STATE_DETACHED,_}] = AccN}) ->
                            NS = {?STATE_ATTACHED, Node},
                            {SoFar, [NS|AccN]};
                       (#member{node  = Node,
                                state = ?STATE_ATTACHED},{SoFar, AccN}) ->
                            NS = {?STATE_ATTACHED, Node},
                            {SoFar, [NS|AccN]};
                       (#member{node  = Node,
                                state = ?STATE_DETACHED},{SoFar, [{?STATE_ATTACHED,_}] = AccN}) ->
                            NS = {?STATE_DETACHED, Node},
                            {SoFar, [NS|AccN]};
                       (#member{node  = Node,
                                state = ?STATE_DETACHED},{SoFar, AccN}) ->
                            NS = {?STATE_DETACHED, Node},
                            {SoFar, [NS|AccN]};
                       (_Member, SoFar) ->
                            SoFar
                    end, {false, []}, Members_1),
  
              case rebalance_1(State, Nodes) of
                  {ok, RetRebalance} ->
                      case leo_redundant_manager_api:get_members() of
                          {ok, Members_2} ->
                              {ok, SystemConf} = leo_manager_mnesia:get_system_config(),
                              case rebalance_3(Nodes, #rebalance_proc_info{members_cur = Members_2,
                                                                           system_conf = SystemConf}) of
                                  ok ->
                                      _ = distribute_members([N || {_, N} <- Nodes]),
                                      rebalance_5(RetRebalance, []);
                                  {error, Cause}->
                                      ?error("rebalance/0", "cause:~p", [Cause]),
  