Revert UPI [] -> [FirstRepairing] to commit 91496c6

This commit is contained in:
Scott Lystig Fritchie 2015-08-06 15:21:44 +09:00
parent 01da7a7046
commit 82b6726261

View file

@ -666,17 +666,13 @@ calc_projection(_OldThreshold, _NoPartitionThreshold, LastProj,
TentativeUPI = NewUPI_list3, TentativeUPI = NewUPI_list3,
TentativeRepairing = Repairing_list5, TentativeRepairing = Repairing_list5,
AllTentativeUPI_witnesses_p =
lists:all(fun(X) -> lists:member(X, OldWitness_list) end,
TentativeUPI),
{NewUPI, NewRepairing} = {NewUPI, NewRepairing} =
if (TentativeUPI == [] orelse AllTentativeUPI_witnesses_p) if TentativeUPI == [] andalso TentativeRepairing /= [] ->
andalso TentativeRepairing /= [] -> %% UPI is empty (not including witnesses), so grab
%% UPI is empty or all in UPI are witnesses, so grab
%% the first from the repairing list and make it the %% the first from the repairing list and make it the
%% only non-witness in the UPI. %% only non-witness in the UPI.
[FirstRepairing|TailRepairing] = TentativeRepairing, [FirstRepairing|TailRepairing] = TentativeRepairing,
{TentativeUPI ++ [FirstRepairing], TailRepairing}; {[FirstRepairing], TailRepairing};
true -> true ->
{TentativeUPI, TentativeRepairing} {TentativeUPI, TentativeRepairing}
end, end,