# Safely deleting indices

**URL:** <https://discuss.elastic.co/t/safely-deleting-indices/162525>\
**Category:** Elasticsearch\
**Created:** [December 31, 2018, 4:01pm UTC](https://discuss.elastic.co/t/safely-deleting-indices/162525 "2018-12-31T16:01:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitavmohanty01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amitavmohanty01/32/58017_2.png) [@amitavmohanty01](https://discuss.elastic.co/u/amitavmohanty01)\
**Post date:** [December 31, 2018, 4:01pm UTC](https://discuss.elastic.co/t/safely-deleting-indices/162525/1 "2018-12-31T16:01:58Z")

</div>

I wanted to clean up old indices so I deleted them. Now, I have started seeing the following exceptions.

```
[2018-12-31T07:22:02,260][WARN][o.e.i.s.GlobalCheckpointSyncAction] [elkelastic01.host1] unexpected error during the primary phase for action [indices:admin/seq_no/global_checkpoint_sync], request [GlobalCheckpointSyncAction.Request{shardId=[log_type1-2018.12.23][20], timeout=1m, index='log_type1-2018.12.23', waitForActiveShards=1}]

org.elasticsearch.index.IndexNotFoundException: no such index

```

`[2018-12-31T07:22:02,261][INFO][o.e.i.s.GlobalCheckpointSyncAction] [elkelastic01.host1] [log_type1-2018.12.23][20] global checkpoint sync failed`

Is the DELETE call not a distributed commit? Will these exceptions stop after some attempts ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 31, 2018, 4:44pm UTC](https://discuss.elastic.co/t/safely-deleting-indices/162525/2 "2018-12-31T16:44:54Z")

</div>

> [@amitavmohanty01](#):
>
> Is the DELETE call not a distributed commit?

It is, but assuming [this is the same cluster as before](https://discuss.elastic.co/t/primary-shard-not-available/161687/6) it has so many shards that cluster state publishing might be happening rather slowly.

> [@amitavmohanty01](#):
>
> Will these exceptions stop after some attempts?

They should do, yes.

---

<div class="post-metadata">

**Author:** ![amitavmohanty01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amitavmohanty01/32/58017_2.png) [@amitavmohanty01](https://discuss.elastic.co/u/amitavmohanty01)\
**Post date:** [December 31, 2018, 5:04pm UTC](https://discuss.elastic.co/t/safely-deleting-indices/162525/3 "2018-12-31T17:04:13Z")

</div>

> [@DavidTurner](#):
>
> It is, but assuming [this is the same cluster as before](https://discuss.elastic.co/t/primary-shard-not-available/161687/6) it has so many shards that cluster state publishing might be happening rather slowly.

Slow is fine. Will the HTTP call return before the distributed commit is completed?

I was thinking that if the HTTP call has completed then these logs should not be showing up.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 31, 2018, 5:50pm UTC](https://discuss.elastic.co/t/safely-deleting-indices/162525/4 "2018-12-31T17:50:46Z")

</div>

> [@amitavmohanty01](#):
>
> Will the HTTP call return before the distributed commit is completed?

Possibly, yes. If it returns `200 OK` then the deletion has been committed and will eventually reach all nodes.

---

<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:** [January 28, 2019, 5:53pm UTC](https://discuss.elastic.co/t/safely-deleting-indices/162525/5 "2019-01-28T17:53:56Z")

</div>

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