Open n0othing opened 2 years ago
Pinging @elastic/es-data-management (Team:Data Management)
The EnrichPolicyMaintenanceService
shouldn't remove any .enrich-*
index if any policy is currently being executed. It looks like here a policy is executing during a maintenance cycle. I think we should avoid this from happening in the same way the maintenance cycle doesn't start if enrich policy are currently executing. The enrich execute policy api should wait or fail if maintenance cycle is running.
Elasticsearch Version
7.17.4
Installed Plugins
No response
Java Version
bundled
OS Version
RHEL 7
Problem Description
During a subsequent enrichment policy execution,
EnrichPolicyMaintenanceService
can flag the new enrichment index as stale while it's being indexed to. This can lead to the new index being created a second time (due tocause [auto(bulk api)]
), which will also get deleted during the nextenrich.cleanup_period
.Steps to Reproduce
In the below logs, a second execution of
my_policy
was executing during a maintenance cycle..enrich-my_policy-1654635601016
was still receiving data so it hadn't been promoted, resulting in it getting deleted:A second
.enrich-my_policy-1654635601016
was created due to the on-going reindex process:Reindex continues and the index is promoted:
The second
.enrich-my_policy-1654635601016
gets deleted because it it doesn't have a policy name in the index settings:Logs (if relevant)