Adjust author of inner projections to yield same checksum
This commit is contained in:
parent
cd026303a0
commit
65ee0c23ec
1 changed files with 14 additions and 3 deletions
|
@ -895,14 +895,25 @@ react_to_env_A30(Retries, P_latest, LatestUnanimousP, _ReadExtra,
|
||||||
{_, P_newprop3_flap_count} when P_newprop3_flap_count >= FlapLimit ->
|
{_, P_newprop3_flap_count} when P_newprop3_flap_count >= FlapLimit ->
|
||||||
AllHosed = get_all_hosed(P_newprop3),
|
AllHosed = get_all_hosed(P_newprop3),
|
||||||
{P_i, S_i} = calc_projection(S3, MyName, AllHosed),
|
{P_i, S_i} = calc_projection(S3, MyName, AllHosed),
|
||||||
|
%% The inner projection will have a fake author, which
|
||||||
|
%% everyone will agree is the largest UPI member's
|
||||||
|
%% name.
|
||||||
|
BiggestUPIMember =
|
||||||
|
if P_i#projection_v1.upi == [] ->
|
||||||
|
%% Oops, ok, fall back to author
|
||||||
|
P_i#projection_v1.author_server;
|
||||||
|
true ->
|
||||||
|
lists:last(lists:sort(P_i#projection_v1.upi))
|
||||||
|
end,
|
||||||
|
P_i2 = P_i#projection_v1{author_server=BiggestUPIMember},
|
||||||
P_inner = case lists:member(MyName, AllHosed) of
|
P_inner = case lists:member(MyName, AllHosed) of
|
||||||
false ->
|
false ->
|
||||||
P_i;
|
P_i2;
|
||||||
true ->
|
true ->
|
||||||
P_i#projection_v1{
|
P_i2#projection_v1{
|
||||||
upi=[MyName],
|
upi=[MyName],
|
||||||
repairing=[],
|
repairing=[],
|
||||||
down=P_i#projection_v1.all_members
|
down=P_i2#projection_v1.all_members
|
||||||
-- [MyName]}
|
-- [MyName]}
|
||||||
end,
|
end,
|
||||||
FinalInnerEpoch =
|
FinalInnerEpoch =
|
||||||
|
|
Loading…
Reference in a new issue