# Data Retention Data retention policy can be realised by TStorage using special USConnector command - **DELETE**. It deletes data by key ranges (keyMin, keyMax). **DELETE** removes whole partitions - key range is rounded to partitions boundaries. ## Description Only whole partitions are deleted. i.e., those fully covered by the **DELETE** key range. If the key range does not cover the whole key range that logically belongs to a given partition, the partition is not deleted. PUTs are not allowed within key range, for which deletion is pending. Otherwise, interleaved PUTs and DELETEs may corrupt range partition. ### Usage 1. Client that executes deletion can connect only to a USConnector which resides on the same machine as Client. 2. Unblock deletion (reference to commandserver.py usage) on the USConnector. 3. Perfrom **DELETE** request on the USConnector. 4. Block deletion on the USConnector. ## **DELETE** Command To use this command, one has to enable it on the USConnector first. ### **DELETE Request**
cmd \= 4 size \= size of KeyRange ### **DELETE Response \- SUCCESS**
result \= 0 size \= size of KeyRange USConnector sends back key range that was taken into account while deleting. ### **DELETE Response \- ERROR**
result \= 1 size \= 0