Rollover is never acknowledged

For some reason my _rollover calls never get acknowledged:

Index alias: logstash

POST logstash/_rollover
{
  "conditions": {
    "max_size":  "43.7gb"
  }
}

Index info:

GET logstash/_settings
logstash/_settings?pretty
{
  "logstash-000002" : {
    "settings" : {
      "index" : {
        "allocation" : {
          "max_retries" : "10"
        },
        "mapping" : {
          "total_fields" : {
            "limit" : "2000"
          }
        },
        "refresh_interval" : "5s",
        "number_of_shards" : "1",
        "provided_name" : "logstash-000002",
        "creation_date" : "1548957055823",
        "number_of_replicas" : "1",
        "uuid" : "RtpxnugZQnKDpKr2QU13ew",
        "version" : {
          "created" : "6040299"
        }
      }
    }
  }
}

ES info:

{
  "name" : "ZAWRu-L",
  "cluster_name" : "569304875476:leo-perfect",
  "cluster_uuid" : "HYRo-SiLTZePoRCOdjtTVA",
  "version" : {
    "number" : "6.4.2",
    "build_flavor" : "oss",
    "build_type" : "zip",
    "build_hash" : "04711c2",
    "build_date" : "2018-10-16T09:16:35.059415Z",
    "build_snapshot" : false,
    "lucene_version" : "7.4.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

What size is the index logstash-000002? You can check by running:

GET _cat/indices/logstash-000002?v

Which will give you something that looks like:

health status index     uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   testindex TRcknejsRUSkdz_UkDj-Xg   5   1          4            0     25.1kb         12.5kb

Rollover looks at the primary store size, shown above as the column pri.store.size, rather than the size including replicas (which is just store.size), and will only roll over if the index's primary store size is greater than the max_size parameter in the rollover request (or if any other provided conditions match).

1 Like

@gbrown Thanks for the clarification.

As soon as I made the necessary modifications, the index rolled over :sweat_smile:

GET _cat/indices?v
health status index            uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   logstash-000002  RtpxnugZQnKDpKr2QU13ew   1   1  198581920            0     43.8gb           22gb
green  open   logstash-000001  aEqNz95YRsm08rEfeB4d_A   1   1     145875            0       60mb           30mb
green  open   logstash-000003  k3xEAF2kR4yH92QG-O4Log   1   1          0            0       522b           261b

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