From d7b0456bb08d076dce83c6915b9f7b29bb8c43ee Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 5 Feb 2024 15:49:48 +0100 Subject: [PATCH] feat: rename emqx ctl cluster_sync 'tnxid' to 'inspect' --- apps/emqx_conf/src/emqx_conf_cli.erl | 18 ++++++++++++------ changes/ce/feat-12483.en.md | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 changes/ce/feat-12483.en.md diff --git a/apps/emqx_conf/src/emqx_conf_cli.erl b/apps/emqx_conf/src/emqx_conf_cli.erl index d519e2e05..3a1261b30 100644 --- a/apps/emqx_conf/src/emqx_conf_cli.erl +++ b/apps/emqx_conf/src/emqx_conf_cli.erl @@ -89,6 +89,10 @@ admins(["skip", Node0]) -> emqx_cluster_rpc:skip_failed_commit(Node), status(); admins(["tnxid", TnxId0]) -> + %% changed to 'inspect' in 5.6 + %% TODO: delete this clause in 5.7 + admins(["inspect", TnxId0]); +admins(["inspect", TnxId0]) -> TnxId = list_to_integer(TnxId0), print(emqx_cluster_rpc:query(TnxId)); admins(["fast_forward"]) -> @@ -145,12 +149,14 @@ usage_conf() -> usage_sync() -> [ - {"conf cluster_sync status", "Show cluster config sync status summary"}, - {"conf cluster_sync skip [node]", "Increase one commit on specific node"}, - {"conf cluster_sync tnxid ", - "Display detailed information of the config change transaction at TnxId"}, - {"conf cluster_sync fast_forward [node] [tnx_id]", - "Fast-forward config change transaction to tnx_id on the given node." + {"conf cluster_sync status", "Show cluster config sync status summary for all nodes."}, + {"conf cluster_sync inspect ", + "Inspect detailed information of the config change transaction at the given commit ID"}, + {"conf cluster_sync skip [node]", + "Increment the (currently failing) commit on the given node.\n" + "WARNING: This results in inconsistent configs among the clustered nodes."}, + {"conf cluster_sync fast_forward [node] ", + "Fast-forward config change to the given commit ID on the given node.\n" "WARNING: This results in inconsistent configs among the clustered nodes."} ]. diff --git a/changes/ce/feat-12483.en.md b/changes/ce/feat-12483.en.md new file mode 100644 index 000000000..ef49dedbb --- /dev/null +++ b/changes/ce/feat-12483.en.md @@ -0,0 +1,2 @@ +Renamed `emqx ctl conf cluster_sync tnxid ID` to `emqx ctl conf cluster_sync inspect ID`. +For backward compatibility, `tnxid` is kept, but considered deprecated and will be removed in 5.7.