-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Data Management/ILM+SLMIndex and Snapshot lifecycle managementIndex and Snapshot lifecycle management>docsGeneral docs changesGeneral docs changes
Description
If I have two competing policies:
PUT _ilm/policy/my_lifecycle3
{
"policy": {
"phases": {
"warm": {
"min_age": "30s",
"actions": {
"forcemerge": {
"max_num_segments": 1
},
"shrink": {
"number_of_shards": 1
},
"allocate": {
"include": {
"type": ""
},
"exclude": {},
"require": {}
}
}
},
"cold": {
"min_age": "60s",
"actions": {
"allocate": {
"number_of_replicas": 2,
"include": {
"type": "cold"
},
"exclude": {},
"require": {}
}
}
},
"delete": {
"min_age": "2m",
"actions": {
"delete": {}
}
}
}
}
}And an alternate policy:
PUT _ilm/policy/newpolicy
{
"policy": {
"phases": {
"warm": {
"min_age": "100m",
"actions": {
"forcemerge": {
"max_num_segments": 1
},
"allocate": {
"number_of_replicas": 2,
"include": {
"type": "cold"
},
"exclude": {},
"require": {}
}
}
},
"delete": {
"min_age": "200m",
"actions": {
"delete": {}
}
}
}
}
}And I create an index with the first policy (where the "warm phase kicks in at
30 seconds"):
PUT /foo
{
"settings": {
"index.lifecycle.name": "my_lifecycle3",
"index.number_of_shards": 2
}
}Then wait at least 30 seconds until the "foo" index is in the
warm/complete/complete action (meaning everything in the warm phase has
finished, the index is between 30 and 60 seconds old)
Next, I update the policy for the "foo" index to use the "newpolicy", which has
a "warm" phase with a min_age of 100 minutes:
PUT /foo/_settings
{
"index.lifecycle.name": "newpolicy"
}The step info for the foo index is still at warm/complete/complete, meaning
that it has now skipped the steps that would normally occur in the newpolicy
"warm" phase, even though the index is not old enough yet to transition into the
"warm" phase with the new policy.
GoodMirek
Metadata
Metadata
Assignees
Labels
:Data Management/ILM+SLMIndex and Snapshot lifecycle managementIndex and Snapshot lifecycle management>docsGeneral docs changesGeneral docs changes