Skip to content

[8.19] Failure-store failures yield O(N²) message sizes [#157859] (#162017) - #162487

Merged
lukewhiting merged 1 commit into
elastic:8.19from
lukewhiting:backport/8.19/pr-162017
Oct 19, 2026
Merged

lukewhiting merged 1 commit into
elastic:8.19from
lukewhiting:backport/8.19/pr-162017

Conversation

@lukewhiting

Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…astic#162017)

* Seperate out failure store exceptions from main bulk failure exception

* Address PR comment and add support for stack trace printing of additional exceptions

* Update docs/changelog/162017.yaml

* [CI] Update transport version definitions

* Update docs/changelog/162017.yaml

Co-authored-by: Mary Gouseti <mgouseti@gmail.com>

* Small PR feedback suggestion fixes

* Switch to managing suppressed exceptions during serialization

* Add assertion that document can't get 2 failure store errors

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Mary Gouseti <mgouseti@gmail.com>
(cherry picked from commit d4e4eab)

# Conflicts:
#	server/src/main/java/org/elasticsearch/ElasticsearchException.java
#	server/src/main/java/org/elasticsearch/action/bulk/BulkItemResponse.java
#	server/src/main/java/org/elasticsearch/action/bulk/BulkOperation.java
#	server/src/main/java/org/elasticsearch/action/search/SearchPhaseExecutionException.java
#	server/src/main/resources/transport/upper_bounds/9.4.csv
#	server/src/main/resources/transport/upper_bounds/9.5.csv
#	server/src/main/resources/transport/upper_bounds/9.6.csv
#	server/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java
#	server/src/test/java/org/elasticsearch/action/bulk/BulkItemResponseFailureWireSerializingTests.java
#	server/src/test/java/org/elasticsearch/action/bulk/BulkItemResponseTests.java
#	server/src/test/java/org/elasticsearch/action/bulk/BulkOperationTests.java

@romseygeek romseygeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM


/**
* Records that handling an already failed document with the failure store also failed. The cause of the original failure may be
* shared by every item of a failed shard bulk, so adding to it once per item grows the response quadratically (see #157859). Older

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe reword this comment to make it clearer that we are only writing it once, so that we are avoiding the quadratic repetition?

@lukewhiting
lukewhiting merged commit 15d2014 into elastic:8.19 Oct 19, 2026
27 checks passed
@lukewhiting
lukewhiting deleted the backport/8.19/pr-162017 branch October 20, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants