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

Deduplicate created objects when deserializing InternalAggregations in SearchResponse #124296

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Mar 7, 2025

Looking into heap dump of a cluster performing a CCS, I observed a huge amount of duplicated objects coming from deserializing the internal aggregations from the remove clusters search responses:

image

We observed a very similar situation in coordination nodes for standard searches and it was introduced a mechanism to deduplicate objects inside DelayedWritable. This commit proposes to expose the deduplicator stream and use it when deserializing InternalAggregations in SearchResponse.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 7, 2025
Copy link
Member

@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.

LGTM

@iverase iverase added the auto-backport Automatically create backport pull requests when merged label Mar 10, 2025
@iverase iverase merged commit 9042201 into elastic:main Mar 10, 2025
17 checks passed
@iverase iverase deleted the dedupplicateAggsSearchResponse branch March 10, 2025 10:12
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

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

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

iverase added a commit to iverase/elasticsearch that referenced this pull request Mar 10, 2025
…n SearchResponse (elastic#124296)

It should help in case of cross cluster search.
iverase added a commit to iverase/elasticsearch that referenced this pull request Mar 10, 2025
…n SearchResponse (elastic#124296)

It should help in case of cross cluster search.
# Conflicts:
#	server/src/main/java/org/elasticsearch/action/search/SearchResponse.java
iverase added a commit to iverase/elasticsearch that referenced this pull request Mar 10, 2025
…n SearchResponse (elastic#124296)

It should help in case of cross cluster search.
# Conflicts:
#	server/src/main/java/org/elasticsearch/action/search/SearchResponse.java
elasticsearchmachine pushed a commit that referenced this pull request Mar 10, 2025
…n SearchResponse (#124296) (#124462)

It should help in case of cross cluster search.
elasticsearchmachine pushed a commit that referenced this pull request Mar 10, 2025
…n SearchResponse (#124296) (#124463)

It should help in case of cross cluster search.
# Conflicts:
#	server/src/main/java/org/elasticsearch/action/search/SearchResponse.java
iverase added a commit that referenced this pull request Mar 10, 2025
…n SearchResponse (#124296) (#124464)

It should help in case of cross cluster search.
# Conflicts:
#	server/src/main/java/org/elasticsearch/action/search/SearchResponse.java
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Mar 11, 2025
…n SearchResponse (elastic#124296)

It should help in case of cross cluster search.
jfreden pushed a commit to jfreden/elasticsearch that referenced this pull request Mar 13, 2025
…n SearchResponse (elastic#124296)

It should help in case of cross cluster search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations auto-backport Automatically create backport pull requests when merged backport pending >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.1 v8.19.0 v9.0.1 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants