Skip to content

Don't serialize the entire query when query parsing fails #51843

Closed
@jimczi

Description

@jimczi

Today when the query parsing fails on a shard, we create a QueryShardException that serializes the entire QueryBuilder in the message. All these exceptions are kept on a per-shard basis by the coordinating node so we except them to be light weight. For very large boolean queries (with lots of clauses that trip the max_clause_count for instance) this can cause memory pressure on the coordinating node since we don't de-duplicate exceptions coming from different shards.
The simplest fix would be to limit the size of the QueryShardException's message by truncating the QueryBuilder serialization if it is above a certain threshold (1k ?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/LoggingLog management and logging utilities:Search/SearchSearch-related issues that do not fall into other categories>enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions