Fix canceled federated SERVICE queries wedging dataset (GH-3837)#3847
Closed
utafrali wants to merge 1 commit intoapache:mainfrom
Closed
Fix canceled federated SERVICE queries wedging dataset (GH-3837)#3847utafrali wants to merge 1 commit intoapache:mainfrom
utafrali wants to merge 1 commit intoapache:mainfrom
Conversation
When a federated SERVICE query gets canceled, the old code still tried to drain the response body on close. This caused the HTTP client to wait for the full response even though the query was aborted, which could wedge the connection and lock up the target dataset. Add isAborted check in closeRetainedConnection() to skip draining when the query was canceled. Also add test case to verify aborted queries don't hang on close.
Author
|
gonna close this for now, doesn't seem like it's needed anymore |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #3837
When a federated SERVICE query gets canceled, the old code still tried to drain the response body on close. This caused the HTTP client to wait for the full response even though the query was aborted, which could wedge the connection and lock up the target dataset.
The fix adds an
isAbortedcheck incloseRetainedConnection(). If the query was canceled, we just cancel the future and close the connection without trying to read the response. Otherwise, we use the original logic to drain the body before reusing the connection.Added a test case to verify that aborted queries don't hang on close.