Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better messages when valkey-cli cluster --fix meet value check failed (…
…valkey-io#867) The clusterManagerCompareKeysValues is introduced in 143bfa1, which calls DEBUG DIGEST-VALUE to check whether the value of the source node and the target node are consistent. However, the DEBUG DIGEST-VALUE command is not supported in older version, such as version 4, and the node will return unknown subcommand. Or the DEBUG command can be disabled in version 7, and the node will return DEBUG not allowed. In these cases, we need to output friendly message to allow users to proceed to the next step, instead of just outputing `Value check failed!`. Unknown subcommand example: ``` *** Target key exists *** Checking key values on both nodes... Node 127.0.0.1:30001 replied with error: ERR unknown subcommand or wrong number of arguments for 'DIGEST-VALUE'. Try DEBUG HELP. Node 127.0.0.1:30003 replied with error: ERR unknown subcommand or wrong number of arguments for 'DIGEST-VALUE'. Try DEBUG HELP. *** Value check failed! DEBUG DIGEST-VALUE command is not supported. You can relaunch the command with --cluster-replace option to force key overriding. ``` DEBUG not allowed example: ``` *** Target key exists *** Checking key values on both nodes... Node 127.0.0.1:30001 replied with error: ERR DEBUG command not allowed. If the enable-debug-command option is ... Node 127.0.0.1:30003 replied with error: ERR DEBUG command not allowed. If the enable-debug-command option is ... *** Value check failed! DEBUG command is not allowed. You can turn on the enable-debug-command option. Or you can relaunch the command with --cluster-replace option to force key overriding. ``` Signed-off-by: Binbin <[email protected]>
- Loading branch information