From 4378ef7b542d3cc0ad7ce8371af2b7f572f17031 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Tue, 1 Sep 2015 00:51:46 +0900 Subject: [PATCH] Bugfix: inner->outer proj @ A30 --- src/machi_chain_manager1.erl | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/machi_chain_manager1.erl b/src/machi_chain_manager1.erl index a95a673..0653e7a 100644 --- a/src/machi_chain_manager1.erl +++ b/src/machi_chain_manager1.erl @@ -1323,7 +1323,29 @@ react_to_env_A30(Retries, P_latest, LatestUnanimousP, _ReadExtra, %% of what state C103 does? Go to C103 instead? P_newprop12 = machi_projection:update_checksum( P_newprop11#projection_v1{epoch_number=NewEpoch}), - react_to_env_C100(P_newprop12, P_newprop11, S); + + %% Move to C300 to avoid repeating the same none proj (and + %% multiple writes to the same private epoch that + %% concidentally are permitted because the projection is + %% exactly the same) + %% + %% The other problem in this execution is that there are a + %% couple of other parties that are not flapping because + %% they see this A30->C100 problem & repeat is + %% short-circuiting all of the flapping logic. If I + %% change A30->C100 to be A30->C300 instead, then I hope + %% that other effect will resolve itself correctly. + + if P_latest#projection_v1.author_server == MyName, + P_latest#projection_v1.upi == [] -> + ?REACT({a30, ?LINE, []}), + io:format(user, "CONFIRM debug A30->C100 by ~w\n",[MyName]), + react_to_env_C100(P_newprop12, P_latest, S); + true -> + ?REACT({a30, ?LINE, []}), + io:format(user, "CONFIRM debug A30->C300 by ~w\n",[MyName]), + react_to_env_C300(P_newprop12, P_latest, S) + end; MoveToNorm_p, CMode == cp_mode, not CurrentHasZerf_p ->