-
Notifications
You must be signed in to change notification settings - Fork 995
[KYUUBI #7301] Fix engine not killed after deregisterEngine #7302
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -367,6 +367,18 @@ private[kyuubi] class EngineRef( | |
| val msg = s"Deleting engine node:$sn" | ||
| info(msg) | ||
| discoveryClient.delete(s"$engineSpace/${sn.nodeName}") | ||
|
|
||
| if (shareLevel != CONNECTION && builder != null) { | ||
| try { | ||
| val appMgrInfo = builder.appMgrInfo() | ||
| engineManager.killApplication(appMgrInfo, engineRefId, Some(appUser)) | ||
| info(s"Killed engine process for $engineRefId with share level $shareLevel") | ||
| } catch { | ||
| case e: Exception => | ||
| warn(s"Error killing engine process for $engineRefId", e) | ||
| } | ||
| } | ||
|
Comment on lines
+371
to
+380
|
||
|
|
||
| (true, msg) | ||
| } else { | ||
| val msg = s"Engine node:$sn is not matched with host&port[$hostPort]" | ||
|
|
||
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.
Missing null check for engineManager. The condition should be updated to check both builder and engineManager for null before attempting to call killApplication. Without this check, a NullPointerException will occur when engineManager is null, such as in test scenarios where EngineRef is instantiated with a null engineManager parameter.