# Curator Rollover ignores max\_docs condition

**URL:** <https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229>\
**Category:** Elasticsearch\
**Created:** [May 10, 2017, 10:38am UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229 "2017-05-10T10:38:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbmsys](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pbmsys](https://discuss.elastic.co/u/pbmsys)\
**Post date:** [May 10, 2017, 10:38am UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229/1 "2017-05-10T10:38:41Z")

</div>

Hi.

I have setup a curator job to rollover my index every 2.000.000 docs. But curator keeps making the rollover every 1.000.000 docs.

My action file:

```
actions:
  1:
    action: rollover
    description: "Rollover the index associated with alias 'active-logs'"
    options:
      disable_action: false
      name: active-logs
      conditions:
        max_docs: 2000000
      continue_if_exception: False
      timeout_override:

```

any idea why this is happening

/Peter

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 10, 2017, 11:59am UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229/2 "2017-05-10T11:59:25Z")

</div>

Curator is only forwarding the API call. What do you see if you send this in Console or curl?

Also, I believe that Elasticsearch counts all copies of your documents, so replicas make a difference to the count. 2,000,000 would be 1,000,000 if you have 1 replica shard.

---

<div class="post-metadata">

**Author:** ![pbmsys](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pbmsys](https://discuss.elastic.co/u/pbmsys)\
**Post date:** [May 10, 2017, 12:34pm UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229/3 "2017-05-10T12:34:39Z")

</div>

@theuntergeek That makes perfect sense. We have 1 replica shard on the specific index.  
Thank you very much

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 10, 2017, 12:41pm UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229/4 "2017-05-10T12:41:38Z")

</div>

It's not supposed to do that, of course, but for now it is. See [this issue](https://github.com/elastic/elasticsearch/issues/24217).

---

<div class="post-metadata">

**Author:** ![pbmsys](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pbmsys](https://discuss.elastic.co/u/pbmsys)\
**Post date:** [May 10, 2017, 12:54pm UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229/5 "2017-05-10T12:54:06Z")

</div>

I will just subscribe to the issue so we don't get caught in creating doubled indexes after an upgrade 🙂

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:** [June 7, 2017, 1:09pm UTC](https://discuss.elastic.co/t/curator-rollover-ignores-max-docs-condition/85229/6 "2017-06-07T13:09:10Z")

</div>

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