Skip to content

[main] Fix an OOM error when creating to many chained synonym graph token filter. (#140026)#8

Open
tomerqodo wants to merge 4 commits intocodex_only-issues-20260113-augment-codex-sentry_base_main_fix_an_oom_error_when_creating_to_many_chained_synonym_graph_token_filter_140026_pr68from
codex_only-issues-20260113-augment-codex-sentry_head_main_fix_an_oom_error_when_creating_to_many_chained_synonym_graph_token_filter_140026_pr68
Open

[main] Fix an OOM error when creating to many chained synonym graph token filter. (#140026)#8
tomerqodo wants to merge 4 commits intocodex_only-issues-20260113-augment-codex-sentry_base_main_fix_an_oom_error_when_creating_to_many_chained_synonym_graph_token_filter_140026_pr68from
codex_only-issues-20260113-augment-codex-sentry_head_main_fix_an_oom_error_when_creating_to_many_chained_synonym_graph_token_filter_140026_pr68

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from qodo-benchmark#68

afoucret and others added 4 commits December 31, 2025 10:59
…lter. (elastic#140026)

* Create YAML REST test for chained synonym filters.

* Adding some unit tests for chained synonyms graph filters creation.

* Ensure previous synonyms set from the chain aren't applied again.

(cherry picked from commit e6bd70d)
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8aaa34f284

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

//
// This matches the behavior of SynonymTokenFilterFactory and prevents OOM with chained
// synonym filters (critical for users with many chained synonym sets).
return this;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Return identity filter for synonym parsing

In chained synonym_graph setups, buildSynonymAnalyzer(...) (in SynonymTokenFilterFactory) builds the synonym parser analyzer by calling getSynonymFilter() on previous filters. Returning this here keeps prior synonym_graph filters active, so synonym rules for later filters are still expanded by earlier filters, recreating the recursive expansion/large SynonymMap problem the change is meant to prevent. This means the OOM scenario with multiple chained synonym_graph filters can still occur. Consider returning IDENTITY_FILTER (as SynonymTokenFilterFactory does) or otherwise disabling synonym_graph filters during synonym parsing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants