etcdutl: Add three parameters in order to support more complex hashkv compare operations#21202
etcdutl: Add three parameters in order to support more complex hashkv compare operations#21202evertrain wants to merge 1 commit intoetcd-io:mainfrom
Conversation
…plex hashkv compare Signed-off-by: evertrain <evertrain@qq.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: evertrain The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @evertrain. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hi @ahrtr , @serathius , could you help review this PR when you have a moment? The above functionality has helped us identify the discrepancies in snapshots between different etcd members in the internal builds, which should be beneficial to the community. |
Add three parameters to etcdutl hashkv, in order to support more complex hashkv compare operations.
--compact-rev is used to specify the lower bound for hash calculation in the snapshot, forming an interval with the upper bound --rev, which facilitates hash value comparison between different snapshots.
When --detailed is enabled, it can output hash values for different keys, making it easier to further pinpoint which keys are inconsistent when hash discrepancies are detected in different snapshot files. Additionally, --output can specify the file to save the key hash values. If --output is not specified, the output will be directed to standard output.