Skip to content

Remove unsafe default executor for transport responses#98131

Merged
elasticsearchmachine merged 1 commit intoelastic:mainfrom
DaveCTurner:2023/08/02/response-handler-default-executor
Aug 2, 2023
Merged

Remove unsafe default executor for transport responses#98131
elasticsearchmachine merged 1 commit intoelastic:mainfrom
DaveCTurner:2023/08/02/response-handler-default-executor

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

Today TransportResponseHandler (and derivatives like
ActionListenerResponseHandler) silently default to handling the
response on the transport worker thread. This is not a safe default: we
should only be avoiding forking for the most performance-critical
things. This commit removes this unsafe default so that callers must
always specify an executor, prompting implementors and reviewers to
consider the threading model more deeply.

Today `TransportResponseHandler` (and derivatives like
`ActionListenerResponseHandler`) silently default to handling the
response on the transport worker thread. This is not a safe default: we
should only be avoiding forking for the most performance-critical
things. This commit removes this unsafe default so that callers must
always specify an executor, prompting implementors and reviewers to
consider the threading model more deeply.
@DaveCTurner DaveCTurner added :Distributed/Network Http and internode communication implementations >refactoring >tech debt v8.10.0 labels Aug 2, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label Aug 2, 2023
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner DaveCTurner added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Aug 2, 2023
@elasticsearchmachine elasticsearchmachine merged commit 295bdbf into elastic:main Aug 2, 2023
@DaveCTurner DaveCTurner deleted the 2023/08/02/response-handler-default-executor branch August 2, 2023 11:38
ChrisHegarty pushed a commit that referenced this pull request Aug 9, 2023
Fix the compilation after merging #98131 which removed a constructor
that we were using. The old constructor used the transport thread to
execute the response. I checked all of the cases where the compilation
failed and all of those places looked appropriate to run on the
transport worker.
@DaveCTurner DaveCTurner restored the 2023/08/02/response-handler-default-executor branch June 17, 2024 06:16
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!) :Distributed/Network Http and internode communication implementations >refactoring Team:Distributed Meta label for distributed team. v8.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants