This is an automated email from the ASF dual-hosted git repository.

feiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 73e49f136 [KYUUBI #4045] Add withAcquireRelease for 
newExecuteOnServerOperation
73e49f136 is described below

commit 73e49f1360dbace06ad46acbc93745c323c7b52b
Author: fwang12 <[email protected]>
AuthorDate: Fri Dec 30 19:52:19 2022 +0800

    [KYUUBI #4045] Add withAcquireRelease for newExecuteOnServerOperation
    
    ### _Why are the changes needed?_
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run 
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #4045 from turboFei/with_release.
    
    Closes #4045
    
    1382f96ab [fwang12] withAcquireRelease
    
    Authored-by: fwang12 <[email protected]>
    Signed-off-by: fwang12 <[email protected]>
---
 .../main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
index bb6301ed2..3d33daff9 100644
--- 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
+++ 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
@@ -273,7 +273,7 @@ class KyuubiSessionImpl(
       statement: String,
       confOverlay: Map[String, String],
       runAsync: Boolean,
-      queryTimeout: Long): OperationHandle = {
+      queryTimeout: Long): OperationHandle = withAcquireRelease() {
     val kyuubiNode = parser.parsePlan(statement)
     kyuubiNode match {
       case command: RunnableCommand =>
@@ -282,9 +282,7 @@ class KyuubiSessionImpl(
           runAsync,
           command)
         runOperation(operation)
-      case _ =>
-        super.executeStatement(statement, confOverlay, runAsync, queryTimeout)
+      case _ => super.executeStatement(statement, confOverlay, runAsync, 
queryTimeout)
     }
-
   }
 }

Reply via email to