-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[SPARK-8839][SQL]ThriftServer2 will remove session and execution no matter it's finished or not. #7239
Conversation
…atter it's finished or not.
Test build #36576 has finished for PR 7239 at commit
|
Hi, @liancheng will you take a look at this issue? |
@tianyi Could you please help reviewing this one? Thanks! |
@SaintBacchus , thanks for fixing this issue. |
It's a better idea @tianyi.
|
Test build #36664 has finished for PR 7239 at commit
|
@SaintBacchus As for the semantics of the
|
@liancheng Maybe I mistook this issue, but it actually existed. |
@SaintBacchus Yeah, I agree there is a bug, just wanted to point out that it's not related to the |
@SaintBacchus Could you please update the PR description to reflect the actual cause? |
@liancheng I had updated the description. |
I think we should only fix the mistake of removing alive sessions or executions in this PR. |
@@ -199,6 +200,7 @@ object HiveThriftServer2 extends Logging { | |||
def onStatementParsed(id: String, executionPlan: String): Unit = { | |||
executionList(id).executePlan = executionPlan | |||
executionList(id).state = ExecutionState.COMPILED | |||
trimExecutionIfNecessary() |
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.
I think it is not necessary here.
We already do the checking work when a session opened or an execution started. |
@tianyi In my solution all the unfinished sessions will keep in memory. If we don't check after session finish, we have to wait a new client to trigger this check.
|
@SaintBacchus yes, I agree that, but I don't understand why we have to remove a closed session immediately. If there are more than 200 session alive, I think there will be more client connecting soon. |
@tianyi reducing a little memory if there is no new client coming soon. |
I agree with you. |
@tianyi Thanks for review and comment , I had removed it. |
Test build #36904 has finished for PR 7239 at commit
|
@liancheng Can you merge it into master if it's OK? |
LGTM, merging to master. Thanks! |
In my test,
sessions
andexecutions
in ThriftServer2 is not the same number as the connection number.For example, if there are 200 clients connecting to the server, but it will have more than 200
sessions
andexecutions
.So if it reaches the
retainedStatements
, it has to remove some object which is not finished.So it may cause the exception described in Jira Address