WIP: pre-travel code, not sure if good, check in for history

This commit is contained in:
Scott Lystig Fritchie 2015-07-30 13:12:08 -07:00
parent aa1a31982a
commit 3f51357577

View file

@ -586,6 +586,8 @@ calc_projection(_OldThreshold, _NoPartitionThreshold, LastProj,
repair_final_status=RepairFS}=S) -> repair_final_status=RepairFS}=S) ->
#projection_v1{epoch_number=OldEpochNum, #projection_v1{epoch_number=OldEpochNum,
members_dict=MembersDict, members_dict=MembersDict,
all_members=OldAll_list,
witnesses=OldWitness_list,
upi=OldUPI_list, upi=OldUPI_list,
repairing=OldRepairing_list repairing=OldRepairing_list
} = LastProj, } = LastProj,
@ -661,11 +663,21 @@ calc_projection(_OldThreshold, _NoPartitionThreshold, LastProj,
{TentativeUPI, TentativeRepairing} {TentativeUPI, TentativeRepairing}
end, end,
P = machi_projection:new(OldEpochNum + 1, P = case NewUPI -- OldWitness_list of
MyName, MembersDict, Down, NewUPI, NewRepairing, [] ->
D_foo ++ io:format(user, "\nNONE proj ~p\n", [OldEpochNum+1]),
Dbg ++ [{ps, Partitions},{nodes_up, Up}]), NP = make_none_projection(MyName, OldAll_list, MembersDict),
{P, S#ch_mgr{runenv=RunEnv3}}. NP#projection_v1{epoch_number=OldEpochNum + 1};
_ ->
machi_projection:new(OldEpochNum + 1,
MyName, MembersDict,
Down, NewUPI, NewRepairing,
D_foo ++
Dbg ++ [{ps, Partitions},{nodes_up, Up}])
end,
P2 = machi_projection:update_checksum(
P#projection_v1{witnesses=OldWitness_list}),
{P2, S#ch_mgr{runenv=RunEnv3}}.
check_latest_private_projections_same_epoch(FLUs, MyProj, Partitions, S) -> check_latest_private_projections_same_epoch(FLUs, MyProj, Partitions, S) ->
%% NOTE: The caller must provide us with the FLUs list for all %% NOTE: The caller must provide us with the FLUs list for all