-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Close task after calling sendResponse() #94865
Merged
elasticsearchmachine
merged 1 commit into
elastic:main
from
DaveCTurner:2023-03-29-close-task-after-channel-sendResponse
Mar 29, 2023
Merged
Close task after calling sendResponse() #94865
elasticsearchmachine
merged 1 commit into
elastic:main
from
DaveCTurner:2023-03-29-close-task-after-channel-sendResponse
Mar 29, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Today we unregister transport tasks before calling `TransportChannel#sendResponse` in order to send back the response. Yet the serialization and transmission work is still really part of the task's work, so we should keep the task around until these parts are done too. This commit delays the task unregistration until after `sendResponse` returns, which is simple to achieve. Delaying it until the end of transmission is a little harder and will be the subject of future work. Relates elastic#94845
DaveCTurner
added
>non-issue
:Distributed Coordination/Network
Http and internode communication implementations
v8.8.0
labels
Mar 29, 2023
elasticsearchmachine
added
the
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
label
Mar 29, 2023
Pinging @elastic/es-distributed (Team:Distributed) |
original-brownbear
approved these changes
Mar 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM fine by me if CI is happy :)
idegtiarenko
approved these changes
Mar 29, 2023
DaveCTurner
added
the
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
label
Mar 29, 2023
DaveCTurner
deleted the
2023-03-29-close-task-after-channel-sendResponse
branch
March 29, 2023 13:10
elasticsearchmachine
pushed a commit
that referenced
this pull request
Apr 11, 2023
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Apr 26, 2023
Due to elastic#94865, we now send an ack before the task gets removed, so we can see a non-zero amount of tasks in the task manager for a short amount of time. We can just busy wait until the task gets removed. See elastic#95494, elastic#94987
elasticsearchmachine
pushed a commit
that referenced
this pull request
May 25, 2023
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 Coordination/Network
Http and internode communication implementations
>non-issue
Team:Distributed (Obsolete)
Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
v8.8.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today we unregister transport tasks before calling
TransportChannel#sendResponse
in order to send back the response. Yet the serialization and transmission work is still really part of the task's work, so we should keep the task around until these parts are done too.This commit delays the task unregistration until after
sendResponse
returns, which is simple to achieve. Delaying it until the end of transmission is a little harder and will be the subject of future work.Relates #94845