Skip to content

Commit a8763b6

Browse files
ruanwenjunruanwenjun
authored andcommitted
Move stmtHandleChangeLock to the head when cancel KyuubiStatement
1 parent e6509c7 commit a8763b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiStatement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ public KyuubiStatement(
130130
@Override
131131
public void cancel() throws SQLException {
132132
try {
133+
stmtHandleChangeLock.lock();
133134
checkConnection("cancel");
134135
if (isCancelled) {
135136
return;
136137
}
137-
stmtHandleChangeLock.lock();
138138
if (stmtHandle != null) {
139139
TCancelOperationReq cancelReq = new TCancelOperationReq(stmtHandle);
140140
TCancelOperationResp cancelResp = client.CancelOperation(cancelReq);

0 commit comments

Comments
 (0)