Skip to content

Commit

Permalink
Fix to handle leo_storage status properly
Browse files Browse the repository at this point in the history
  • Loading branch information
yosukehara committed Feb 20, 2015
1 parent 93bf437 commit d657fcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/leo_redundant_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,13 @@ create_2( Ver, [#member{state = ?STATE_DETACHED}|Rest], Acc) ->
create_2(Ver, Rest, Acc);
create_2( Ver, [#member{state = ?STATE_RESERVED}|Rest], Acc) ->
create_2(Ver, Rest, Acc);
create_2( Ver, [#member{node = Node} = Member_0|Rest], Acc) ->
create_2( Ver, [#member{node = Node,
state = State} = Member_0|Rest], Acc) ->
%% Modify/Add a member into 'member-table'
Table = ?member_table(Ver),
Ret_2 = case leo_cluster_tbl_member:lookup(Table, Node) of
{ok, Member_1} when State == ?STATE_ATTACHED ->
{ok, Member_1#member{state = ?STATE_RUNNING}};
{ok, Member_1} ->
{ok, Member_1};
not_found ->
Expand Down

0 comments on commit d657fcf

Please sign in to comment.