Skip to content

[8.x] Handle InternalSendException inline for non-forking handlers (#114375)#114493

Merged
elasticsearchmachine merged 1 commit intoelastic:8.xfrom
ywangd:backport/8.x/pr-114375
Oct 10, 2024
Merged

[8.x] Handle InternalSendException inline for non-forking handlers (#114375)#114493
elasticsearchmachine merged 1 commit intoelastic:8.xfrom
ywangd:backport/8.x/pr-114375

Conversation

@ywangd
Copy link
Copy Markdown
Member

@ywangd ywangd commented Oct 10, 2024

Backports the following commits to 8.x:

…#114375)

When TransportService fails to send a transport action, it can complete
the listener's `onFailure` with the `generic` executor. If the listener
is a `PlainActionFuture` and also waits to be completed with a `generic`
thread, it will trip the `assertCompleteAllowed` assertion. 

https://github.com/elastic/elasticsearch/blob/fb482f863d5430702b19bd3dd23e9d8652f12ddd/server/src/main/java/org/elasticsearch/transport/TransportService.java#L1062-L1064

With this PR, we no longer fork to the generic thread pool and instead
just handle the exeption inline with the current thread. The expectation
is that the downstream handler should take care potential stack overflow
issues. This is similar to what is done in elastic#109236
@ywangd ywangd added :Distributed/Network Http and internode communication implementations >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Distributed Meta label for distributed team. labels Oct 10, 2024
@elasticsearchmachine elasticsearchmachine merged commit fc70177 into elastic:8.x Oct 10, 2024
@ywangd ywangd deleted the backport/8.x/pr-114375 branch October 10, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Distributed/Network Http and internode communication implementations Team:Distributed Meta label for distributed team. v8.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants