...
Page Properties | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
Resources & Remarks Modification History
|
Excerpt |
---|
Delete all objects of a specific tenant which have a deletion flagthat are flagged for deletion. |
This command may be useful, e.g., if a deletion of objects was requested and those objects were have been requested to be deleted, and flagged for deletion, but this the deletion itself did not happen take place due to unforeseen circumstances. Such states can be recognized by the maintain-compare
Command command. Using the maintain-delete
command will then help to clean up those inconsistent inconsistent object states.
The command will runs continuously run for a specified amount of time, determines the objects that were flagged for deletion in the Elasticsearch index and deletes them, including all references into to the yuuvis® Momentum system that may still exist. Thus, it is ensured all flagged objects are deleted from the Elasticsearch index, and, if necessary, from the database and the repository. In addition, all old versions are deleted too. If no further object is found, the command will stop even if the maximum running run time is not yet exceededreached.
The following parameters can be given to the maintain-
delete command:
Parameter | Argument Type | Description | Required | Default | Example |
---|---|---|---|---|---|
--tenant <arg> | string | Tenant for which flagged objects should are to be searched and deleted. | yes | - | --tenant default |
| string | Target directory for result log. | no | - | --target-directory C:\Users\myusername\ymdeletionlog |
--fetch-size <arg> | int | Fetch size for Elasticsearch requests. Maximum number of objects included in each Elasticsearch request. The value must be at least 1 and not bigger than 10000. | no | 1000 | --fetch-size 50 |
--running-time <arg> | int | The maximum amount of seconds this command is allowed to run before stopping. The value must be at least 1 and not bigger than 86400. | no | 5 | --running-time 3600 |
--no-random | boolean | Setting this flag will prevent using a random seed to search for flagged objects. | no | false | --no-random |
...
In the following example, all objects that are flagged for deletion will be deleted. The job will continuously search for the next 100 (see: --fetch-size
) flagged objects and process them, until the maximum running time of 1 hour (see: --running-time
) was exceeded is reached or there is no additional object no further objects are flagged for deletion.
Code Block | ||||
---|---|---|---|---|
| ||||
Lt. Commander>maintain-delete --tenant default --running-time 3600 --fetch-size 100 Running delete job for tenant 'default' for 3600s |
...