# Endless creating index after delete another index

**URL:** https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334
**Category:** Elasticsearch
**Created:** [August 28, 2018, 12:07pm UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334 "2018-08-28T12:07:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lunatic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lunatic/32/55516_2.png) [@lunatic](https://discuss.elastic.co/u/lunatic)
#### Post date: [August 28, 2018, 12:07pm UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/1 "2018-08-28T12:07:50Z")

</div>

I deleted some of my indices, but after about 1~10s the cluster create another index(being deleted long time ago) automatically.

For example:  
delete index `request-log-2018-05-03`,created `request-log-2018-05-30`, but the index `request-log-2018-05-30` was deleted before a week or earlier.

I get following info in pending tasks:

```auto
GET _cat/pending_tasks?v
insertOrder timeInQueue priority source
       1580 7.3s URGENT delete-index [[request-log-2018-05-03/d8u11H0QTMSb1QVN5I-uGg]]
       1581 6s HIGH put-mapping
       1582 76ms NORMAL allocation dangled indices [request-log-2018-05-30]

```

ES version: 6.3.0

@bleskes could you please have a look?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [August 28, 2018, 12:26pm UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/2 "2018-08-28T12:26:30Z")

</div>

Is it possible that you could have a split-brain scenario? Which version of Elasticsearch are you using? How many nodes do you have in the cluster? How many of these are master-eligible? What is your `minimum_master_nodes` set to?

---

<div class="post-metadata">

### Author: ![lunatic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lunatic/32/55516_2.png) [@lunatic](https://discuss.elastic.co/u/lunatic)
#### Post date: [August 28, 2018, 12:30pm UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/3 "2018-08-28T12:30:09Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> minimum\_master\_nodes

there are 3 master-eligible nodes in my cluster and the value of `minimum_master_nodes ` is set to 2.  
25 nodes total in my cluster.

**Version 6.3.0.**

@Christian_Dahlqvist any ideas?

---

<div class="post-metadata">

### Author: ![lunatic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lunatic/32/55516_2.png) [@lunatic](https://discuss.elastic.co/u/lunatic)
#### Post date: [August 28, 2018, 12:54pm UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/4 "2018-08-28T12:54:08Z")

</div>

And the indices are taged by `UNASSIGNED DANGLING_INDEX_IMPORTED`

`curl -s -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED`

```auto
log-2018-05-24 3 p UNASSIGNED DANGLING_INDEX_IMPORTED
log-2018-05-24 3 r UNASSIGNED DANGLING_INDEX_IMPORTED
log-2018-05-24 4 p UNASSIGNED DANGLING_INDEX_IMPORTED
...

```

but all of the indices are empty and **I deleted them about one month ago**.

---

<div class="post-metadata">

### Author: ![lunatic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lunatic/32/55516_2.png) [@lunatic](https://discuss.elastic.co/u/lunatic)
#### Post date: [September 3, 2018, 4:24am UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/5 "2018-09-03T04:24:22Z")

</div>

Solved by allocating all the failed shards instead of deleting them.

```auto
POST /_cluster/reroute
{
  "commands": [
    {
      "allocate_empty_primary": {
        "index": "nginx_log-2018-06-20",
        "shard": 0,
        "node": "uL9qINwtQqmMpSEnugloEg",
        "accept_data_loss": true
      }
    }
  ]
}

```

After allocated these indices , you can delete them.

Note: this operation may cause data loss.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 1, 2018, 4:24am UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/6 "2018-10-01T04:24:26Z")

</div>

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