Minimum lifecycles for time series data stream

When you create a time series data stream (TSDS) without a data stream lifecycle, Elasticsearch adds a minimum lifecycle. A minimum lifecycle performs only the operations a data stream needs to stay healthy: rollover and tail merging.

A minimum lifecycle applies in the following conditions:

A minimum lifecycle includes the following operations:

  • The data stream backing indices are rolled over whenever they grow beyond the size, age, or number of documents defined in cluster.lifecycle.default.rollover.
  • After a roll over, a tail merge operation occurs to improve the storage footprint and search performance on the most recent rolled-over data.

For more information about these operations, refer to Data stream lifecycle in Elasticsearch > How does it work?.

The minimum lifecycle doesn't provide downsampling, move data to searchable snapshots, or delete data (even if you configure global retention settings such as data_streams.lifecycle.retention.default and data_streams.lifecycle.retention.max). To turn on those features, you can configure your own lifecycle. Refer to Update the lifecycle of a data stream.

A data stream with a lifecycle that is explicitly turned off keeps that configuration and the minimum lifecycle does not apply.

To check whether a data stream or an index is managed by a minimum lifecycle, use the following APIs:

  • Get data stream API: returns "minimum_lifecycle_enabled": true and "next_generation_managed_by": "Data stream lifecycle" for the data stream.
  • Get data stream lifecycle API: returns "minimum_lifecycle_enabled": true for the data stream.
  • Explain data stream lifecycle API: returns "minimum_lifecycle_enabled": true for each index the minimum lifecycle manages. For indices that no lifecycle manages, the response includes an unmanaged_reason field when Elasticsearch can determine why. The ILM explain API includes the same field.
Important

Before 9.6, a TSDS without a lifecycle or an ILM policy was never rolled over automatically. If an external process rolls over your TSDS, you might now see additional backing indices. If your TSDS has an ILM policy, no data stream lifecycle, and index.lifecycle.prefer_ilm is set to false, it moves from ILM to the minimum lifecycle. As a result, ILM phases such as delete or downsample stop running for it.

To restore the previous behavior, set data_streams.lifecycle.minimum.enabled to false. The setting is dynamic, so you don't need to restart Elasticsearch. For example:

				PUT _cluster/settings
					{
  "persistent": {
    "data_streams.lifecycle.minimum.enabled": false
  }
}