Merge pull request #8546 from thalesmg/fix-dashboard-cluster-rate
fix: dashboard monitor crash after badrpc
This commit is contained in:
commit
2e75c35995
|
@ -115,13 +115,16 @@ granularity_adapter(List) ->
|
||||||
%% Get the current rate. Not the current sampler data.
|
%% Get the current rate. Not the current sampler data.
|
||||||
current_rate() ->
|
current_rate() ->
|
||||||
Fun =
|
Fun =
|
||||||
fun(Node, Cluster) ->
|
fun
|
||||||
case current_rate(Node) of
|
(Node, Cluster) when is_map(Cluster) ->
|
||||||
{ok, CurrentRate} ->
|
case current_rate(Node) of
|
||||||
merge_cluster_rate(CurrentRate, Cluster);
|
{ok, CurrentRate} ->
|
||||||
{badrpc, Reason} ->
|
merge_cluster_rate(CurrentRate, Cluster);
|
||||||
{badrpc, {Node, Reason}}
|
{badrpc, Reason} ->
|
||||||
end
|
{badrpc, {Node, Reason}}
|
||||||
|
end;
|
||||||
|
(_Node, Error) ->
|
||||||
|
Error
|
||||||
end,
|
end,
|
||||||
case lists:foldl(Fun, #{}, mria_mnesia:cluster_nodes(running)) of
|
case lists:foldl(Fun, #{}, mria_mnesia:cluster_nodes(running)) of
|
||||||
{badrpc, Reason} ->
|
{badrpc, Reason} ->
|
||||||
|
|
Loading…
Reference in New Issue