Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Jun 2, 2025

Backport of #128362 to 9.0

…lastic#128362)

Starting with Lucene 10, `CharacterRunAutomaton` is no longer determinized automatically.
In Elasticsearch 9, we adapted to this by eagerly determinizing automatons early (via `Regex#simpleMatchToAutomaton`).
However, this introduced  regression: operations like index template conflict checks, which only require intersection testing, now pay the cost of determinization—an expensive step that wasn’t needed before. In some cases, especially when many wildcard patterns are involved, determinization can even fail due to state explosion.

This change removes the unnecessary determinization, restoring the pre-9.0 behavior and allowing valid index templates with many patterns to be registered again.
@jimczi jimczi added >bug :Data Management/Indices APIs APIs to create and manage indices and templates backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v9.0.3 labels Jun 2, 2025
@elasticsearchmachine elasticsearchmachine merged commit 5a94245 into elastic:9.0 Jun 2, 2025
16 checks passed
@jimczi jimczi deleted the backport_128362 branch June 2, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Data Management/Indices APIs APIs to create and manage indices and templates v9.0.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants