-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ILM don't rollover empty indices (#89557)
- Loading branch information
Showing
8 changed files
with
278 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
pr: 89557 | ||
summary: ILM don't rollover empty indices | ||
area: ILM+SLM | ||
type: enhancement | ||
issues: | ||
- 86203 | ||
highlight: | ||
title: ILM no longer rolls over empty indices | ||
body: |- | ||
For both new and existing Index Lifecycle Management (ILM) policies, | ||
the rollover action will only execute if an index has at least one document. | ||
For indices with a `max_age` condition that are no longer being written | ||
to, this will mean that they will no longer roll over every time their | ||
`max_age` is reached. | ||
A policy can override this behavior, and explicitly opt in to rolling over | ||
empty indices, by adding a `"min_docs": 0` condition: | ||
[source,console] | ||
---- | ||
PUT _ilm/policy/allow_empty_rollover_policy | ||
{ | ||
"policy": { | ||
"phases": { | ||
"hot": { | ||
"actions": { | ||
"rollover" : { | ||
"max_age": "7d", | ||
"max_size": "100gb", | ||
"min_docs": 0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
---- | ||
This can also be disabled on a cluster-wide basis by setting | ||
`indices.lifecycle.rollover.only_if_has_documents` to `false`. | ||
notable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.