diff --git a/docs/reference/ilm/actions/ilm-rollover.asciidoc b/docs/reference/ilm/actions/ilm-rollover.asciidoc index 4731986bd2559..3a60d689b4c0f 100644 --- a/docs/reference/ilm/actions/ilm-rollover.asciidoc +++ b/docs/reference/ilm/actions/ilm-rollover.asciidoc @@ -7,6 +7,13 @@ Phases allowed: hot. Rolls over a target to a new index when the existing index satisfies the specified rollover conditions. +[NOTE] +==== +When an index is rolled over, the previous index's age is updated to reflect the rollover time. +This date, rather than the index's `creation_date`, is used in {ilm} +`min_age` phase calculations. <>. +==== + IMPORTANT: If the rollover action is used on a <>, policy execution waits until the leader index rolls over (or is <>), @@ -46,11 +53,11 @@ PUT my-index-000001 [[ilm-rollover-options]] ==== Options -A rollover action must specify at least one max_* condition, it may include zero -or more min_* conditions. An empty rollover action is invalid. +A rollover action must specify at least one `max_*` condition, it may include zero +or more `min_*` conditions. An empty rollover action is invalid. -The index will rollover once any max_* condition is satisfied and all -min_* conditions are satisfied. Note, however, that empty indices are not rolled +The index will roll over once any `max_*` condition is satisfied and all +`min_*` conditions are satisfied. Note, however, that empty indices are not rolled over by default. // tag::rollover-conditions[] @@ -256,7 +263,7 @@ PUT _ilm/policy/my_policy ===== Roll over using multiple conditions When you specify multiple rollover conditions, -the index is rolled over when _any_ of the max_* and _all_ of the min_* conditions are met. +the index is rolled over when _any_ of the `max_*` and _all_ of the `min_*` conditions are met. This example rolls the index over if it is at least 7 days old or at least 100 gigabytes, but only as long as the index contains at least 1000 documents. diff --git a/docs/reference/ilm/error-handling.asciidoc b/docs/reference/ilm/error-handling.asciidoc index ad974c6f1c2ed..d922fa6687823 100644 --- a/docs/reference/ilm/error-handling.asciidoc +++ b/docs/reference/ilm/error-handling.asciidoc @@ -154,11 +154,12 @@ You can use the <> to monitor the === Common {ilm-init} setting issues [discrete] +[[min-age-calculation]] ==== How `min_age` is calculated When setting up an <> or <>, be aware that `min_age` can be relative to either the rollover time or the index creation time. -If you use <>, `min_age` is calculated relative to the time the index was rolled over. This is because the <> generates a new index. The `creation_date` of the new index (retrievable via <>) is used in the calculation. If you do not use rollover in the {ilm-init} policy, `min_age` is calculated relative to the `creation_date` of the original index. +If you use <>, `min_age` is calculated relative to the time the index was rolled over. This is because the <> generates a new index and updates the `age` of the previous index to reflect the rollover time. If the index hasn't been rolled over, then the `age` is the same as the `creation_date` for the index. You can override how `min_age` is calculated using the `index.lifecycle.origination_date` and `index.lifecycle.parse_origination_date` <>. diff --git a/docs/reference/ilm/ilm-index-lifecycle.asciidoc b/docs/reference/ilm/ilm-index-lifecycle.asciidoc index 80b5c65504214..acf59645dae13 100644 --- a/docs/reference/ilm/ilm-index-lifecycle.asciidoc +++ b/docs/reference/ilm/ilm-index-lifecycle.asciidoc @@ -43,6 +43,12 @@ a "cold" phase with a minimum age either unset, or >= 10 days. The minimum age defaults to zero, which causes {ilm-init} to move indices to the next phase as soon as all actions in the current phase complete. +[NOTE] +==== +If an index has been <>, then the `min_age` value is relative to the time +the index was rolled over, not the index creation time. <>. +==== + If an index has unallocated shards and the <> is yellow, the index can still transition to the next phase according to its {ilm} policy. However, because {es} can only perform certain clean up tasks on a green diff --git a/docs/reference/ilm/ilm-tutorial.asciidoc b/docs/reference/ilm/ilm-tutorial.asciidoc index 36d89b7df6f21..53e8f7d8c7d04 100644 --- a/docs/reference/ilm/ilm-tutorial.asciidoc +++ b/docs/reference/ilm/ilm-tutorial.asciidoc @@ -57,7 +57,7 @@ reaches either a `max_primary_shard_size` of 50 gigabytes or a `max_age` of 30 d [NOTE] ==== -The `min_age` value is relative to the rollover time, not the index creation time. +The `min_age` value is relative to the rollover time, not the index creation time. <>. ==== You can create the policy through {kib} or with the diff --git a/docs/reference/ilm/index-rollover.asciidoc b/docs/reference/ilm/index-rollover.asciidoc index 5e6c4b89ba99f..231fb81e59fc4 100644 --- a/docs/reference/ilm/index-rollover.asciidoc +++ b/docs/reference/ilm/index-rollover.asciidoc @@ -3,8 +3,7 @@ When indexing time series data like logs or metrics, you can't write to a single index indefinitely. To meet your indexing and search performance requirements and manage resource usage, -you write to an index until some threshold is met and -then create a new index and start writing to it instead. +you write to an index until some threshold is met and then create a new index and start writing to it instead. Using rolling indices enables you to: * Optimize the active index for high ingest rates on high-performance _hot_ nodes. @@ -35,8 +34,15 @@ more configuration steps and concepts: You optimize this configuration for ingestion, typically using as many shards as you have hot nodes. * An _index alias_ that references the entire set of indices. * A single index designated as the _write index_. -This is the active index that handles all write requests. -On each rollover, the new index becomes the write index. +This is the active index that handles all write requests. +On each rollover, the new index becomes the write index. + +[NOTE] +==== +When an index is rolled over, the previous index's age is updated to reflect the rollover time. +This date, rather than the index's `creation_date`, is used in {ilm} +`min_age` phase calculations. <>. +==== [discrete] [[ilm-automatic-rollover]]