- Notifications
You must be signed in to change notification settings - Fork 25.5k
Description
Elasticsearch Version
9.1.0
Installed Plugins
No response
Java Version
bundled
OS Version
ECK
Problem Description
Problem Description
After an upgrade to Elastic v9.0.0, we started to see an exception whenever we tried to update index_tempaltes:
{ "error": { "root_cause": [ { "type": "too_complex_to_determinize_exception", "reason": "too_complex_to_determinize_exception: Determinizing automaton with 562 states and 618 transitions would require more than 10000 effort." } ], "type": "too_complex_to_determinize_exception", "reason": "too_complex_to_determinize_exception: Determinizing automaton with 562 states and 618 transitions would require more than 10000 effort." }, "status": 500 }
After reading this issue and checking es code, it was clear that was due to lucene update. In the above mentioned issue there were a fix made to findConflictingV1Templates, but I did not see the same change done for findConflictingV2Templates. I wonder if this was intended or maybe this fix was not applied to findConflictingV2Templates as well by mistake.
In case this is the intended behavior, I would suggest that this exception is caught and instead http 400 is return with more information on why this is happening and how to avoid it.
Also would be great to have some guide for people that have updated the ECK from 8.x to 9.x mentioning that depending on the index template complexity this might start to happen and to fix one should delete and recreate the culprit index.
Thanks in advance
Steps to Reproduce
Try to execute the following curl command:
curl --request PUT \ --url http://domain:9200/_index_template/somenamespace \ --header 'Content-Type: application/json' \ --header 'User-Agent: insomnia/10.0.0' \ --data '{ "priority": 2000, "template": { "settings": { "index": { "lifecycle": { "name": "cluster-somenamespace" }, "mode": "standard" } }, "mappings": {} }, "index_patterns": [ "cluster-somenamespace-*-app1*", "cluster-somenamespace-*-app2*", "cluster-somenamespace-*-app3*", "cluster-somenamespace-*-app4*", "cluster-somenamespace-*-app5*", "cluster-somenamespace-*-app6*", "cluster-somenamespace-*-app7*", "cluster-somenamespace-*-app8*", "cluster-somenamespace-*-app9*", "cluster-somenamespace-*-app10*", "cluster-somenamespace-*-app11*", "cluster-somenamespace-*-app12*", "cluster-somenamespace-*-app13*", "cluster-somenamespace-*-app14*", "cluster-somenamespace-*-app15*", "cluster-somenamespace-*-app16*", "cluster-somenamespace-*-app17*", "cluster-somenamespace-*-app18*", "cluster-somenamespace-*-app19*" ], "data_stream": { "hidden": false, "allow_custom_routing": false }, "composed_of": [], "ignore_missing_component_templates": [] }'
Logs (if relevant)
No response