v.23.9Improvement

Add optional version argument to rm command for safer deletes in keeper-client

Add optional version argument to rm command in keeper-client to support safer deletes. #54708 (János Benjamin Antal).
Added an optional version argument to the rm command in keeper-client to enable safer deletion of nodes.

Why it matters

This feature helps prevent accidental or conflicting deletions in keeper-client by requiring a specific node version to be specified before removal. It ensures that the node is only deleted if it matches the expected version, thus providing safer and more reliable management of ZooKeeper nodes.

How to use it

Use the rm command with the optional version argument to delete a node only if it matches the specified version. For example:

keeper-client rm path_to_node version_number

This command will remove the node at path_to_node only if its current version matches version_number.