Using wait_for_completion with Snapshot deletes

Hi,

I'm using Elasticsearch 6.3

When I use the Snapshots REST API to delete snapshots I have two problems.

Firstly when I run a delete the a snapshot it will sit and wait for the snapshot to be deleted, which can take quite a while and ideally I would like it to return accepted immediately, which feeds into my second problem that when I do wait for this response it will timeout and return an empty response.

e.g.

curl -i -X DELETE https://cluster/_snapshot/repository-name/snapshot-name
HTTP/2 504
date: Wed, 10 Apr 2019 16:55:57 GMT
content-type: application/json
cache-control: no-cache
{
  "message": "Request Timeout",
}

This would be solved using the wait_for_completion URL parameter but that is unrecognised for deletes

curl -X DELETE "cluster/_snapshot/repository-name/snapshot-name?wait_for_completion=false" | jq
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "request [/_snapshot/repository-name/snapshot-name] contains unrecognized parameter: [wait_for_completion]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "request [/_snapshot/repository-name/snapshot-name] contains unrecognized parameter: [wait_for_completion]"
  },
  "status": 400
}

Whats the best way for me to start the deletion of snapshots, so that I can trigger a delete without waiting for it to finish?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.