Skip to content

Commit

Permalink
Fix LaunchEngine may be closed multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmcgrady committed Mar 1, 2022
1 parent 67d1c5d commit c764269
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import org.apache.kyuubi.events.{EventLogging, KyuubiEvent, KyuubiSessionEvent}
import org.apache.kyuubi.ha.client.ZooKeeperClientProvider._
import org.apache.kyuubi.metrics.MetricsConstants._
import org.apache.kyuubi.metrics.MetricsSystem
import org.apache.kyuubi.operation.{Operation, OperationHandle}
import org.apache.kyuubi.operation.{Operation, OperationHandle, OperationState}
import org.apache.kyuubi.operation.log.OperationLog
import org.apache.kyuubi.service.authentication.EngineSecurityAccessor

Expand Down Expand Up @@ -145,7 +145,7 @@ class KyuubiSessionImpl(
}

override def close(): Unit = {
if (!launchEngineOp.isTimedOut) {
if (!OperationState.isTerminal(launchEngineOp.getStatus.state)) {
closeOperation(launchEngineOp.getHandle)
}
super.close()
Expand Down

0 comments on commit c764269

Please sign in to comment.