Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce memory required for search responses when many shards are unavailable #91365

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented Nov 7, 2022

When there are many shards unavailable, we repeatably store the exact same stack trace and exception. The only difference is the exception message.

This commit fixes this by slightly modifying the created exception to not provide a stacktrace or print its stacktrace as a "reason" when a shard is unavailable.

closes #90622

@benwtrent benwtrent added >bug :Search/Search Search-related issues that do not fall into other categories v8.6.0 labels Nov 7, 2022
@elasticsearchmachine
Copy link
Collaborator

Hi @benwtrent, I've created a changelog YAML for you.

@kingherc kingherc added v8.7.0 and removed v8.6.0 labels Nov 16, 2022
@benwtrent
Copy link
Member Author

@elasticmachine update branch

elasticmachine and others added 5 commits November 17, 2022 09:12
…vailable' of github.com:benwtrent/elasticsearch into feature/search-improve-performance-when-many-shards-unavailable
…ove-performance-when-many-shards-unavailable
@benwtrent benwtrent marked this pull request as ready for review December 16, 2022 17:24
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Dec 16, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@benwtrent benwtrent requested a review from javanna January 3, 2023 14:13
@benwtrent
Copy link
Member Author

run elasticsearch-ci/docs

@benwtrent
Copy link
Member Author

@elasticmachine update branch

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

this looks good, the only bit I would add is a test that verifies that the actual search code throws the right exception, which may get lost over time. Perhaps it's something that we could add to AbstractSearchAsyncActionTests ?

@benwtrent benwtrent requested a review from javanna January 12, 2023 18:28
Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

LGTM thanks @benwtrent !

@javanna javanna added the v8.6.1 label Jan 13, 2023
@javanna
Copy link
Member

javanna commented Jan 13, 2023

I would propose backporting this to 8.6, I added the relevant label.

@benwtrent
Copy link
Member Author

@elasticmachine update branch

@benwtrent
Copy link
Member Author

run elasticsearch-ci/bwc

@benwtrent benwtrent merged commit 8df0008 into elastic:main Jan 13, 2023
@benwtrent benwtrent deleted the feature/search-improve-performance-when-many-shards-unavailable branch January 13, 2023 14:41
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.6

benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Jan 13, 2023
…ailable (elastic#91365)

When there are many shards unavailable, we repeatably store the exact same stack trace and exception. The only difference is the exception message. 

This commit fixes this by slightly modifying the created exception to not provide a stacktrace or print its stacktrace as a "reason" when a shard is unavailable.


closes elastic#90622
elasticsearchmachine pushed a commit that referenced this pull request Jan 13, 2023
…ailable (#91365) (#92907)

When there are many shards unavailable, we repeatably store the exact same stack trace and exception. The only difference is the exception message. 

This commit fixes this by slightly modifying the created exception to not provide a stacktrace or print its stacktrace as a "reason" when a shard is unavailable.


closes #90622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.6.1 v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Searches against a large number of unavailable shards result in very large responses
5 participants