From f0caedb17c6c070a3cc67603a130308c5e1b02a5 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Mon, 16 Dec 2024 17:57:40 +0100 Subject: [PATCH] chore(autoheal): drop minor but confusing optimization --- src/ekka_autoheal.erl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ekka_autoheal.erl b/src/ekka_autoheal.erl index b0ab9e3..e9cafcb 100644 --- a/src/ekka_autoheal.erl +++ b/src/ekka_autoheal.erl @@ -79,13 +79,8 @@ handle_msg(Msg = {create_splitview, Node}, Autoheal = #autoheal{delay = Delay, t case rpc:multicall(Nodes, ekka_mnesia, cluster_view, [], 30000) of {Views, []} -> SplitView = lists:sort(fun compare_view/2, lists:usort(Views)), - case SplitView of - [] -> ignore; - [{_, []}] -> ignore; - _Otherwise -> - Coordinator = coordinator(SplitView), - ekka_node_monitor:cast(Coordinator, {heal_partition, SplitView}) - end, + Coordinator = coordinator(SplitView), + ekka_node_monitor:cast(Coordinator, {heal_partition, SplitView}), Autoheal#autoheal{timer = undefined}; {_Views, BadNodes} -> ?LOG(critical, "Bad nodes found when autoheal: ~p", [BadNodes]),