I am facing an issue with Elasticsearch where, even after the rollover phase is successfully completed and a new index is created, data continues to be inserted into the old rollover index instead of the newly created index even though the old rollover index ilm policy transitioned to delete face. The rollover process seems to be working as expected, but the new index is not being recognized for indexing operations.
Environment:
Elasticsearch Version: v 7.17
ilm policy:
PUT _ilm/policy/demo-rollover_policy
{
"policy": {
"phases": {
"hot": {
"actions": {
"rollover": {
"max_size": "50kb"
}
}
},
"delete": {
"min_age": "5m",
"actions": {
"delete": {}
}
}
}
}
}
Index_template_preview:
{
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "demo-rollover_policy",
"rollover_alias": "demo"
}
}
},
"aliases": {},
"mappings": {}
}
}
Reproduction Steps:
Create an index with the specified ILM policy and index template.
Monitor the rollover process and ensure that the new index is created.
Attempt to insert data into the rollover index.
Expected Behavior:
Data should be inserted into the newly created index after the rollover when posted data into the old rollover index
Actual Behavior:
Data is still being inserted into the old rollover index, however the the rollover index is transitioned to delete phase.
What I have read in the documentation is that on a successful rollover, ES will automatically create the new index according to the template, switch the write index to the new one and change the phase of the old index based on our lifecycle policy.
My understanding to this process is after the successful rollover, when we post data to the old index that is rolled over, it will be inserted into the new index that is created. Is there any configuration that i am missing and causing this behavior.
Note:
This issue is impacting our data indexing workflow, and we would appreciate any guidance or assistance in resolving this behavior.
Thank you for your attention to this matter.