[SPARK-29036][SQL]SparkThriftServer cancel job after execute() thread interrupted#25743
Closed
AngersZhuuuu wants to merge 6 commits into
Closed
[SPARK-29036][SQL]SparkThriftServer cancel job after execute() thread interrupted#25743AngersZhuuuu wants to merge 6 commits into
AngersZhuuuu wants to merge 6 commits into
Conversation
Contributor
Author
|
@juliuszsompolski add a new pr for problem we have discussed . |
juliuszsompolski
approved these changes
Sep 10, 2019
juliuszsompolski
left a comment
Contributor
There was a problem hiding this comment.
LGTM.
Thanks @AngersZhuuuu !
Member
|
ok to test |
|
Test build #110513 has finished for PR 25743 at commit
|
wangyum
reviewed
Sep 12, 2019
| // Actually do need to catch Throwable as some failures don't inherit from Exception and | ||
| // HiveServer will silently swallow them. | ||
| case e: Throwable => | ||
| if (statementId != null) { |
Member
There was a problem hiding this comment.
Could we add a comment explaining why we need this change?
|
Test build #110519 has finished for PR 25743 at commit
|
|
Test build #110644 has finished for PR 25743 at commit
|
juliuszsompolski
approved these changes
Sep 23, 2019
juliuszsompolski
left a comment
Contributor
There was a problem hiding this comment.
LGTM from me. cc @wangyum
Member
|
retest this please |
|
Test build #111216 has finished for PR 25743 at commit
|
wangyum
approved these changes
Sep 23, 2019
Member
|
Merged to master. |
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.
What changes were proposed in this pull request?
Discuss in #25611
If cancel() and close() is called very quickly after the query is started, then they may both call cleanup() before Spark Jobs are started. Then sqlContext.sparkContext.cancelJobGroup(statementId) does nothing.
But then the execute thread can start the jobs, and only then get interrupted and exit through here. But then it will exit here, and no-one will cancel these jobs and they will keep running even though this execution has exited.
So when execute() was interrupted by
cancel(), when get into catch block, we should call canJobGroup again to make sure the job was canceled.Why are the changes needed?
Does this PR introduce any user-facing change?
NO
How was this patch tested?
MT