WIP: chain mgmt prototype scaffolding 9: before start of next simulator stage
This commit is contained in:
parent
0a77c09779
commit
ca5ddb2cf1
1 changed files with 7 additions and 5 deletions
|
@ -268,17 +268,16 @@ cl_read_latest_public_projection(#ch_mgr{proj=Proj}=S) ->
|
||||||
end,
|
end,
|
||||||
Rs = [perhaps_call_t(S, Partitions, FLU, fun() -> DoIt(FLU) end) ||
|
Rs = [perhaps_call_t(S, Partitions, FLU, fun() -> DoIt(FLU) end) ||
|
||||||
FLU <- All_list],
|
FLU <- All_list],
|
||||||
|
FLUsRs = lists:zip(All_list, Rs),
|
||||||
case lists:usort(Rs) of
|
case lists:usort(Rs) of
|
||||||
[P] when is_record(P, projection) ->
|
[P] when is_record(P, projection) ->
|
||||||
Extra = [{all_replied, length(Rs) == length(All_list)}],
|
U_FLUs = [FLU || {FLU, Projx} <- FLUsRs, Projx == P],
|
||||||
{unanimous, P, [{unanimous,true}|Extra], S2};
|
Extra = [{all_members_replied, length(Rs) == length(All_list)}],
|
||||||
|
{unanimous, P, [{unanimous_flus,U_FLUs}|Extra], S2};
|
||||||
_ ->
|
_ ->
|
||||||
FLUsRs = lists:zip(All_list, Rs),
|
|
||||||
{needs_work, FLUsRs, [flarfus], S2} % todo?
|
{needs_work, FLUsRs, [flarfus], S2} % todo?
|
||||||
end.
|
end.
|
||||||
|
|
||||||
% {_Status, S4} = do_read_repair(FLUsRs, Extra, S3),
|
|
||||||
|
|
||||||
%% 1. Do the results contain a projection?
|
%% 1. Do the results contain a projection?
|
||||||
%% perhaps figure that in cl_read_latest_public_projection()?
|
%% perhaps figure that in cl_read_latest_public_projection()?
|
||||||
%% 2. Were there any error_unwritten?
|
%% 2. Were there any error_unwritten?
|
||||||
|
@ -538,6 +537,9 @@ smoke0_test() ->
|
||||||
try
|
try
|
||||||
pong = ping(M0),
|
pong = ping(M0),
|
||||||
|
|
||||||
|
%% If/when calculate_projection_internal_old() disappears, then
|
||||||
|
%% get rid of the comprehension below ... start/ping/stop is
|
||||||
|
%% good enough for smoke0.
|
||||||
[begin
|
[begin
|
||||||
Proj = ?MGR:calculate_projection_internal_old(M0),
|
Proj = ?MGR:calculate_projection_internal_old(M0),
|
||||||
io:format(user, "~w\n", [?MGR:make_projection_summary(Proj)])
|
io:format(user, "~w\n", [?MGR:make_projection_summary(Proj)])
|
||||||
|
|
Loading…
Reference in a new issue