WIP: add more debugging/react info

This commit is contained in:
Scott Lystig Fritchie 2015-07-15 11:25:06 +09:00
parent 7c970d90a6
commit 0f667c4356
2 changed files with 12 additions and 2 deletions

View file

@ -694,6 +694,9 @@ calc_up_nodes_sim(MyName, AllMembers, RunEnv1) ->
[{network_partitions, Partitions2}, [{network_partitions, Partitions2},
{network_islands, Islands2}, {network_islands, Islands2},
{up_nodes, UpNodes}]), {up_nodes, UpNodes}]),
catch ?REACT({calc_up_nodes,?LINE,[{partitions,Partitions2},
{islands,Islands2},
{up_nodes, UpNodes}]}),
{UpNodes, Partitions2, RunEnv2}. {UpNodes, Partitions2, RunEnv2}.
replace(PropList, Items) -> replace(PropList, Items) ->
@ -2073,6 +2076,10 @@ simple_chain_state_transition_is_sane(_Author1, UPI1, Repair1, Author2, UPI2) ->
Answer1 = false == lists:member(error, Orders) Answer1 = false == lists:member(error, Orders)
andalso Orders == lists:sort(Orders) andalso Orders == lists:sort(Orders)
andalso length(UPI2) == NumKeeps + NumOrders, andalso length(UPI2) == NumKeeps + NumOrders,
catch (put(react, [{sane,author1,_Author1, upi1,UPI1, repair1,Repair1,
author2,Author2, upi2,UPI2,
keepsdels,KeepsDels, orders,Orders, numKeeps,NumKeeps,
numOrders,NumOrders, answer1,Answer1}|get(react)])),
if not Answer1 -> if not Answer1 ->
?RETURN2(Answer1); ?RETURN2(Answer1);
true -> true ->

View file

@ -148,6 +148,7 @@ make_summary(#projection_v1{epoch_number=EpochNum,
upi=UPI_list, upi=UPI_list,
repairing=Repairing_list, repairing=Repairing_list,
inner=Inner, inner=Inner,
flap=Flap,
dbg=Dbg, dbg2=Dbg2}) -> dbg=Dbg, dbg2=Dbg2}) ->
InnerInfo = if is_record(Inner, projection_v1) -> InnerInfo = if is_record(Inner, projection_v1) ->
[{inner, make_summary(Inner)}]; [{inner, make_summary(Inner)}];
@ -157,6 +158,8 @@ make_summary(#projection_v1{epoch_number=EpochNum,
[{epoch,EpochNum},{author,Author}, [{epoch,EpochNum},{author,Author},
{upi,UPI_list},{repair,Repairing_list},{down,Down_list}] ++ {upi,UPI_list},{repair,Repairing_list},{down,Down_list}] ++
InnerInfo ++ InnerInfo ++
[{flap, Flap}] ++
%% [{flap, lists:flatten(io_lib:format("~p", [Flap]))}] ++
[{d,Dbg}, {d2,Dbg2}]. [{d,Dbg}, {d2,Dbg2}].
%% @doc Make a `p_srvr_dict()' out of a list of `p_srvr()' or out of a %% @doc Make a `p_srvr_dict()' out of a list of `p_srvr()' or out of a