How do i cancel an ongoing reindex operation?


#1

How do i cancel an ongoing re-index operation?

I am reindexing it seems 118million documents (at 5000 doc/sec) this would take 6 hours in hindsight

How can i cancel this operation?

Cheers
Jacob


(David Pilato) #2

Have a look at the task management API. You should see the reindex task which you can then cancel.


#3

I have used the task api to cancel ,there are 2 ongoing tasks i cannot cancel, is there a way to forcable cancel, because i have calculated the indexing rate and amount of documents and it would take several hours if i let them complete.

cheers
Jacob


(David Pilato) #4

IIRC once you trigger a cancel call, it's not done immediately but have to wait for one of the partial run to end. ie if reindex is done 10000 by 10000, it needs to wait for processing one of those 10000 docs runs.

What is the output of:

GET _tasks?actions=*reindex&detailed

#5

Hi, the output of your request is

GET _tasks?actions=*reindex&detailed

{
  "nodes": {}
}

However if I run

GET _tasks

I get

{
  "nodes": {
    "43aC6EGzRkCQC5aB3-BZHA": {
      "name": "43aC6EG",
      "transport_address": "172.20.0.2:9300",
      "host": "172.20.0.2",
      "ip": "172.20.0.2:9300",
      "roles": [
        "master",
        "data",
        "ingest"
      ],
      "attributes": {
        "ml.machine_memory": "4143083520",
        "xpack.installed": "true",
        "ml.max_open_jobs": "20",
        "ml.enabled": "true"
      },
      "tasks": {
        "43aC6EGzRkCQC5aB3-BZHA:30664555": {
          "node": "43aC6EGzRkCQC5aB3-BZHA",
          "id": 30664555,
          "type": "direct",
          "action": "cluster:monitor/tasks/lists[n]",
          "start_time_in_millis": 1541418905547,
          "running_time_in_nanos": 95368,
          "cancellable": false,
          "parent_task_id": "43aC6EGzRkCQC5aB3-BZHA:30664554",
          "headers": {}
        },
        "43aC6EGzRkCQC5aB3-BZHA:30664554": {
          "node": "43aC6EGzRkCQC5aB3-BZHA",
          "id": 30664554,
          "type": "transport",
          "action": "cluster:monitor/tasks/lists",
          "start_time_in_millis": 1541418905547,
          "running_time_in_nanos": 280777,
          "cancellable": false,
          "headers": {}
        }
      }
    }
  }
}

(David Pilato) #6

So there is no more reindex task operation in progress.


#7

@dadoonet,
Thank you very much, i indeed see this in kibana monitors,

cheers
Jacob


(system) #8

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