fix: use mria.cluster_autoclean and mria.cluster_autoheal

This commit is contained in:
JimMoen 2023-06-15 18:08:29 +08:00
parent b2f4dbd232
commit c4e7129cb6
No known key found for this signature in database
GPG Key ID: 87A520B4F76BA86D
3 changed files with 5 additions and 3 deletions

View File

@ -164,7 +164,7 @@ fields("cluster") ->
sc( sc(
emqx_schema:duration(), emqx_schema:duration(),
#{ #{
mapping => "ekka.cluster_autoclean", mapping => "mria.cluster_autoclean",
default => <<"5m">>, default => <<"5m">>,
desc => ?DESC(cluster_autoclean), desc => ?DESC(cluster_autoclean),
'readOnly' => true 'readOnly' => true
@ -174,7 +174,7 @@ fields("cluster") ->
sc( sc(
boolean(), boolean(),
#{ #{
mapping => "ekka.cluster_autoheal", mapping => "mria.cluster_autoheal",
default => true, default => true,
desc => ?DESC(cluster_autoheal), desc => ?DESC(cluster_autoheal),
'readOnly' => true 'readOnly' => true

View File

@ -118,6 +118,7 @@
list_nodes() -> list_nodes() ->
Running = emqx:cluster_nodes(running), Running = emqx:cluster_nodes(running),
%% all stopped core nodes
Stopped = emqx:cluster_nodes(stopped), Stopped = emqx:cluster_nodes(stopped),
DownNodes = lists:map(fun stopped_node_info/1, Stopped), DownNodes = lists:map(fun stopped_node_info/1, Stopped),
[{Node, Info} || #{node := Node} = Info <- node_info(Running)] ++ DownNodes. [{Node, Info} || #{node := Node} = Info <- node_info(Running)] ++ DownNodes.
@ -181,7 +182,7 @@ node_info(Nodes) ->
emqx_rpc:unwrap_erpc(emqx_management_proto_v3:node_info(Nodes)). emqx_rpc:unwrap_erpc(emqx_management_proto_v3:node_info(Nodes)).
stopped_node_info(Node) -> stopped_node_info(Node) ->
{Node, #{node => Node, node_status => 'stopped'}}. {Node, #{node => Node, node_status => 'stopped', role => core}}.
vm_stats() -> vm_stats() ->
Idle = Idle =

View File

@ -0,0 +1 @@
Fix the problem that the cluster.autoclean configuration item does not take effect.