Closed
Description
Elasticsearch version (bin/elasticsearch --version
): 6.7+ 7.x+
Description of the problem including expected versus actual behavior:
We would like to highlight 2 points in the documentation.
max_docs
and refresh_interval
Both the Rollover API and ILM Rollover action allow using max_docs
as a rollover criteria.
The documentation already mentions about the doc count is only for primary shards.
If you agree, I can submit a change to the documentation on those 2 pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html#rollover-index-api-request-body
- https://www.elastic.co/guide/en/elasticsearch/reference/master/_actions.html#ilm-rollover-action
ILM runs are scheduled
It would be nice to highlight:
- the ILM is scheduled
- one ILM "run" is not necessarily run all the
actions
of astep
within the same run
Steps to reproduce the max_docs behavior:
Ran on 6.8.1:
PUT _cluster/settings
{
"persistent": {
"indices.lifecycle.poll_interval": "5s"
}
}
PUT _ilm/policy/test
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_docs": "2"
}
}
}
}
}
}
PUT _template/test
{
"order": 99,
"index_patterns": [
"test-*"
],
"settings": {
"number_of_shards": 1,
"index.lifecycle.name": "test",
"index.lifecycle.rollover_alias": "test-rollover-alias",
"refresh_interval": "300s"
}
}
PUT test-000001
{
"aliases": {
"test-rollover-alias": {
"is_write_index": true
}
}
}
POST test-rollover-alias/_doc/1
{
"one": 1
}
POST test-rollover-alias/_doc/2
{
"two": 2
}
POST test-rollover-alias/_doc/3
{
"three": 3
}
GET _cat/indices?index=test*&v
# No rollover
POST test-rollover-alias/_refresh
GET _cat/indices?index=test*&v
# Rolled over