# Rollover Index reaches maximum number

**URL:** <https://discuss.elastic.co/t/rollover-index-reaches-maximum-number/280312>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [August 3, 2021, 12:50pm UTC](https://discuss.elastic.co/t/rollover-index-reaches-maximum-number/280312 "2021-08-03T12:50:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Post date:** [August 3, 2021, 12:50pm UTC](https://discuss.elastic.co/t/rollover-index-reaches-maximum-number/280312/1 "2021-08-03T12:50:23Z")

</div>

Hello Team

I am using Elasticsearch version 7.8.0

I am having Rollover define for my indices.

I would like to understand , what will happen if my index reaches maximum numbers :

```auto
my-index-999999

```

Will its stop after this rollover or it would auto extend to `my-index-1000000`

I am not getting this information in documents. Could you please help me to understand this scenario.

---

<div class="post-metadata">

**Author:** ![vincenbr](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@vincenbr](https://discuss.elastic.co/u/vincenbr)\
**Post date:** [August 3, 2021, 4:37pm UTC](https://discuss.elastic.co/t/rollover-index-reaches-maximum-number/280312/2 "2021-08-03T16:37:59Z")

</div>

Hi,  
That is a odd question, but a good one ! So I checked, out of curiosity (because I wouldn't feel comfortable with a one milion index cluster...), in the code.  
and as a matter of fact, it does go beyond 1 million and continues to rollover bravely until 231-1 (Java max integer).  
If you're into java code, see [elasticsearch/MetadataRolloverService.java at 705a40850b61c38a9b28b63730608f6fef455159 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/705a40850b61c38a9b28b63730608f6fef455159/server/src/main/java/org/elasticsearch/action/admin/indices/rollover/MetadataRolloverService.java#L263)

---

<div class="post-metadata">

**Author:** ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)\
**Post date:** [August 4, 2021, 3:02am UTC](https://discuss.elastic.co/t/rollover-index-reaches-maximum-number/280312/3 "2021-08-04T03:02:32Z")

</div>

Thank You @vincenbr for your response and solution.

As we understand one shard should be not more than 25GB in size from performance point of view .. we have decided our rollover criteria accordingly.

Currently we are having my-index-001001 reached. Hence wanted to understand the max reaching point of rollover number.

Once again , Thank You.

---

<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:** [September 1, 2021, 3:03am UTC](https://discuss.elastic.co/t/rollover-index-reaches-maximum-number/280312/4 "2021-09-01T03:03:07Z")

</div>

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