# ElasticsearchException: Concurrent modification of alias \[datastream\] during rollover

**URL:** <https://discuss.elastic.co/t/elasticsearchexception-concurrent-modification-of-alias-datastream-during-rollover/258547>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management, datastreams\
**Created:** [December 14, 2020, 8:15am UTC](https://discuss.elastic.co/t/elasticsearchexception-concurrent-modification-of-alias-datastream-during-rollover/258547 "2020-12-14T08:15:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![altuhovsu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/altuhovsu/32/80791_2.png) [@altuhovsu](https://discuss.elastic.co/u/altuhovsu)\
**Post date:** [December 14, 2020, 8:15am UTC](https://discuss.elastic.co/t/elasticsearchexception-concurrent-modification-of-alias-datastream-during-rollover/258547/1 "2020-12-14T08:15:20Z")

</div>

Hello. We have a datastream with ILM policy (50gb or 30 days).  
It works, but when rollover occurs we see some errors in a logs and some indices created!

This problem occurs only with datastreams and not with simple indices with ILM.

ElasticSearch 7.9.2  
3 nodes: 2 data/master and 1 master-only

```
[2020-12-12T12:42:30,538][INFO][o.e.x.i.IndexLifecycleTransition] [es5] moving index [.ds-logging_fe-000009] from [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] to [{"phase":"hot","action":"rollover","name":"attempt-rollover"}] in policy [logging_fe]
[2020-12-12T12:42:31,469][INFO][o.e.x.i.IndexLifecycleTransition] [es5] moving index [.ds-logging_fe-000010] from [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] to [{"phase":"hot","action":"rollover","name":"attempt-rollover"}] in policy [logging_fe]
[2020-12-12T12:42:32,658][INFO][o.e.x.i.IndexLifecycleTransition] [es5] moving index [.ds-logging_fe-000007] from [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] to [{"phase":"hot","action":"rollover","name":"attempt-rollover"}] in policy [logging_fe]
[2020-12-12T12:42:34,424][INFO][o.e.x.i.IndexLifecycleTransition] [es5] moving index [.ds-logging_fe-000006] from [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] to [{"phase":"hot","action":"rollover","name":"attempt-rollover"}] in policy [logging_fe]
[2020-12-12T12:42:35,334][INFO][o.e.x.i.IndexLifecycleTransition] [es5] moving index [.ds-logging_fe-000008] from [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] to [{"phase":"hot","action":"rollover","name":"attempt-rollover"}] in policy [logging_fe]
[2020-12-12T12:42:36,507][INFO][o.e.c.m.MetadataCreateIndexService] [es5] [.ds-logging_fe-000011] creating index, cause [rollover_data_stream], templates [logging_fe], shards [5]/[1]
[2020-12-12T12:42:38,176][INFO][o.e.c.m.MetadataCreateIndexService] [es5] [.ds-logging_fe-000012] creating index, cause [rollover_data_stream], templates [logging_fe], shards [5]/[1]
[2020-12-12T12:42:38,180][ERROR][o.e.x.i.IndexLifecycleRunner] [es5] policy [logging_fe] for index [.ds-logging_fe-000010] failed on step [{"phase":"hot","action":"rollover","name":"attempt-rollover"}]. Moving to ERROR step
org.elasticsearch.ElasticsearchException: Concurrent modification of alias [logging_fe] during rollover

```

May be the key is that Elastic tries to create two indices at the same time, but, why?

```
[2020-12-12T12:42:36,507][INFO][o.e.c.m.MetadataCreateIndexService] [es5] [.ds-logging_fe-000011] creating index, cause [rollover_data_stream], templates [logging_fe], shards [5]/[1]
[2020-12-12T12:42:38,176][INFO][o.e.c.m.MetadataCreateIndexService] [es5] [.ds-logging_fe-000012] creating index, cause [rollover_data_stream], templates [logging_fe], shards [5]/[1]

```

 ![zipykib](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b0e15cbfb93e9aa38ad6bfc4ec23218412765e9.png)

[full log file (on google drive)](https://drive.google.com/file/d/13FzaL-yvLLhGyiOkoCRcnI0_SYAHvVlw/view?usp=sharing)

Thanks!

---

<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 11, 2021, 8:15am UTC](https://discuss.elastic.co/t/elasticsearchexception-concurrent-modification-of-alias-datastream-during-rollover/258547/2 "2021-01-11T08:15:23Z")

</div>

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