# Rollover runs earlier than expected

**URL:** <https://discuss.elastic.co/t/rollover-runs-earlier-than-expected/359925>\
**Category:** Elasticsearch\
**Created:** [May 21, 2024, 1:29pm UTC](https://discuss.elastic.co/t/rollover-runs-earlier-than-expected/359925 "2024-05-21T13:29:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avnere](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@avnere](https://discuss.elastic.co/u/avnere)\
**Post date:** [May 21, 2024, 1:29pm UTC](https://discuss.elastic.co/t/rollover-runs-earlier-than-expected/359925/1 "2024-05-21T13:29:39Z")

</div>

I have an index with 2 shards, I configured a policy that performs rollover on max\_primary\_shard\_size=40gb.

```auto
"policy": {
      "phases": {
        "hot": {
          "min_age": "0ms",
          "actions": {
            "rollover": {
              "max_primary_shard_size": "40gb"
            }
          }
        },
        "delete": {
          "min_age": "365d",
          "actions": {
            "delete": {
              "delete_searchable_snapshot": true
            }
          }
        }
      }
    }

```

Since moving to version8.12 I see that the rollover is performed earlier ~10-20gb shard size instead ~40gb.

It was working properly on version 7.13.

What could be the reason?

Thanks...

---

<div class="post-metadata">

**Author:** ![avnere](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@avnere](https://discuss.elastic.co/u/avnere)\
**Post date:** [May 22, 2024, 8:09am UTC](https://discuss.elastic.co/t/rollover-runs-earlier-than-expected/359925/2 "2024-05-22T08:09:24Z")

</div>

For example: Rollover is done when:

Shard0 - "docs": "349643740", "store": "17gb"  
Shard1 - "docs": "349549511", "store": "16.9gb"

According to [shard document count]([https://shard](https://shard) document count)  
**There is no hard limit on the physical size of a shard, and each shard can in theory contain up to just over two billion documents**. However, experience shows that shards between 10GB and 50GB typically work well for many use cases, **as long as the per-shard document count is kept below 200 million**.

Is there any new restriction in version 8?
