Skip to content

StressSearchServiceReaperIT_unmute_test #122793

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

Merged

Conversation

drempapis
Copy link
Contributor

@drempapis drempapis commented Feb 17, 2025

Fix for the error described below in StressSearchServiceReaperIT

2024-11-13T06:00:50,891][ERROR][o.e.t.LeakTracker        ] [[Cleaner-0]] LEAK: resource was not cleaned up before it was garbage-collected.
Recent access records: 
Created at:
	in [TEST-StressSearchServiceReaperIT.testStressReaper-seed#[348419C7C7365FE]][testStressReaper]
	org.elasticsearch.action.search.ArraySearchPhaseResults.<init>(ArraySearchPhaseResults.java:28)
	org.elasticsearch.action.search.QueryPhaseResultConsumer.<init>(QueryPhaseResultConsumer.java:86)
	org.elasticsearch.action.search.SearchPhaseController.newSearchPhaseResults(SearchPhaseController.java:841)
	org.elasticsearch.action.search.TransportSearchAction$AsyncSearchActionProvider.newSearchPhase(TransportSearchAction.java:1500)

closes #115816

@drempapis drempapis added the :Search Foundations/Search Catch all for Search Foundations label Feb 17, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@drempapis drempapis added auto-backport Automatically create backport pull requests when merged v9.0.0 v8.17.0 v8.18.0 v8.19.0 labels Feb 17, 2025
Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

See my inline comment, the problem is elsewhere, test code looks good to me.

try {
SearchRequestBuilder searchRequestBuilder = prepareSearch("test").setQuery(matchAllQuery()).setSize(num);
response = searchRequestBuilder.get();
assertHitCountAndNoFailures(searchRequestBuilder, num);
Copy link
Contributor

Choose a reason for hiding this comment

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

No sorry this can't be it. The builder is resolved and the response released right away by assertHitCountAndNoFailures. If we're leaking it's not because we're leaking the actual search response, we're leaking some intermediary objects and likely never get to the search response here.

See this line in the failure:

	org.elasticsearch.action.search.ArraySearchPhaseResults.<init>(ArraySearchPhaseResults.java:28)

we're leaking the intermediary per-shard response array, we're not leaking a fully built response.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, @original-brownbear, for the feedback. After a private discussion, we decided it was safe to unmute the test.

@drempapis drempapis merged commit f220aba into elastic:main Feb 19, 2025
17 checks passed
@drempapis drempapis deleted the fix/StressSearchServiceReaperIT_unmute_test branch February 19, 2025 11:55
@drempapis drempapis self-assigned this Feb 19, 2025
drempapis added a commit to drempapis/elasticsearch that referenced this pull request Feb 19, 2025
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.0
8.17 Commit could not be cherrypicked due to conflicts
8.18 Commit could not be cherrypicked due to conflicts
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 122793

elasticsearchmachine pushed a commit that referenced this pull request Feb 19, 2025
elasticsearchmachine pushed a commit that referenced this pull request Feb 19, 2025
Backports the following commits to 9.0:  -
StressSearchServiceReaperIT_unmute_test (#122793)
elasticsearchmachine pushed a commit that referenced this pull request Feb 19, 2025
Backports the following commits to 8.18:  -
StressSearchServiceReaperIT_unmute_test (#122793)
elasticsearchmachine pushed a commit that referenced this pull request Feb 20, 2025
Backports the following commits to 8.17:  -
StressSearchServiceReaperIT_unmute_test (#122793)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch >test Issues or PRs that are addressing/adding tests v8.17.0 v8.18.0 v8.19.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] StressSearchServiceReaperIT testStressReaper failing
3 participants