Add upi_unanimous annotation to AP mode
This commit is contained in:
parent
fe8ff6033d
commit
5efec1b6cd
2 changed files with 12 additions and 6 deletions
|
@ -2067,11 +2067,18 @@ projection_transition_is_sane_except_si_epoch(
|
||||||
stack, Trace}
|
stack, Trace}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
poll_private_proj_is_upi_unanimous(#ch_mgr{consistency_mode=ap_mode} = S) ->
|
poll_private_proj_is_upi_unanimous(#ch_mgr{proj_unanimous={_,_,_}} = S) ->
|
||||||
S;
|
S;
|
||||||
poll_private_proj_is_upi_unanimous(#ch_mgr{consistency_mode=cp_mode,
|
poll_private_proj_is_upi_unanimous(#ch_mgr{consistency_mode=ap_mode,
|
||||||
proj_unanimous={_,_,_}} = S) ->
|
proj=Proj} = S) ->
|
||||||
|
if Proj#projection_v1.upi == [] % Nobody to poll?
|
||||||
|
orelse
|
||||||
|
Proj#projection_v1.epoch_number == 0 -> % Skip polling for epoch 0?
|
||||||
S;
|
S;
|
||||||
|
true ->
|
||||||
|
%% Try it just a single time, no other waiting
|
||||||
|
poll_private_proj_is_upi_unanimous3(S)
|
||||||
|
end;
|
||||||
poll_private_proj_is_upi_unanimous(#ch_mgr{consistency_mode=cp_mode,
|
poll_private_proj_is_upi_unanimous(#ch_mgr{consistency_mode=cp_mode,
|
||||||
proj_unanimous=false,
|
proj_unanimous=false,
|
||||||
proj=Proj} = S) ->
|
proj=Proj} = S) ->
|
||||||
|
|
|
@ -272,8 +272,7 @@ convergence_demo_testfun(NumFLUs, MgrOpts0) ->
|
||||||
io:format(user, "\nSweet, private projections are stable\n", []),
|
io:format(user, "\nSweet, private projections are stable\n", []),
|
||||||
io:format(user, "\t~P\n", [get(stable), 14]),
|
io:format(user, "\t~P\n", [get(stable), 14]),
|
||||||
io:format(user, "Rolling sanity check ... ", []),
|
io:format(user, "Rolling sanity check ... ", []),
|
||||||
MaxFiles = 130, io:format(user, "Sweet, NOTICE: alternative MaxFiles=~w\n", [MaxFiles]),
|
MaxFiles = 20,
|
||||||
%% MaxFiles = 800,
|
|
||||||
PrivProjs = [{Name, begin
|
PrivProjs = [{Name, begin
|
||||||
{ok, Ps8} = ?FLU_PC:get_all_projections(
|
{ok, Ps8} = ?FLU_PC:get_all_projections(
|
||||||
FLU, private, infinity),
|
FLU, private, infinity),
|
||||||
|
|
Loading…
Reference in a new issue