Merge pull request #11070 from JimMoen/use-mria-autoclean

fix: use mria.cluster_autoclean
This commit is contained in:
zhongwencool 2023-06-16 14:56:52 +08:00 committed by GitHub
commit 5f7e938b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.