fix FoldingPIDs/NextList confusion which makes snapshot_range stuck

the bug was introduced by commit f324972cdd.
This commit is contained in:
YAMAMOTO Takashi 2012-09-12 12:49:48 +09:00
parent ef64425af3
commit 8026dcbdd4

View file

@ -439,10 +439,10 @@ main_loop(State = #state{ next=Next }) ->
?log("init_range_fold ~p -> ~p", [Range, WorkerPID]), ?log("init_range_fold ~p -> ~p", [Range, WorkerPID]),
{FoldingPIDs, NextList} = {NextList, FoldingPIDs} =
case {State#state.a, State#state.b, State#state.c} of case {State#state.a, State#state.b, State#state.c} of
{undefined, undefined, undefined} -> {undefined, undefined, undefined} ->
{[], List}; {List, []};
{_, undefined, undefined} -> {_, undefined, undefined} ->
ok = file:make_link(filename("A", State), filename("AF", State)), ok = file:make_link(filename("A", State), filename("AF", State)),