-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Ensure ExchangeClient is always properly closed #10950
Conversation
206c61e
to
821761d
Compare
@@ -450,6 +450,8 @@ private synchronized QueryResults getNextResult(long token, UriInfo uriInfo, Dat | |||
} | |||
else { | |||
nextToken = OptionalLong.empty(); | |||
// the client is not coming back, make sure the exchangeClient is closed |
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.
Shouldn't this be handled above by closeExchangeClientIfNecessary()
?
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.
closeExchangeClientIfNecessary
only closes the client if a query fails or if a query returns no results (e.g.: a DDL
query)
c4afc59
to
98507e9
Compare
The exchange client used to pull query results may not get closed if a query is abandoned or even when query finished successfully.
98507e9
to
b2fbe05
Compare
Description
The exchange client used to pull query results may not get closed if a
query is abandoned or even when query finished successfully.
General information
This is a very old problem that didn't manifest itself until #10507. Now since the
ExchangeClient
may create files when spooling it is required for the temporary data to be properly disposed upon query completion.Related issues, pull requests, and links
#10507
Documentation
No documentation is needed.
Release notes
No release notes entries required.