yiguolei commented on code in PR #24017:
URL: https://github.com/apache/doris/pull/24017#discussion_r1318139811


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1176,20 +1176,14 @@ private void handleKill() throws DdlException {
         if (killCtx == null) {
             ErrorReport.reportDdlException(ErrorCode.ERR_NO_SUCH_THREAD, id);
         }
-        if (context == killCtx) {
-            // Suicide
-            context.setKilled();
-        } else {
+        if (context != killCtx && 
!killCtx.getQualifiedUser().equals(ConnectContext.get().getQualifiedUser())
+                && 
!Env.getCurrentEnv().getAccessManager().checkGlobalPriv(ConnectContext.get(),
+                PrivPredicate.ADMIN)) {
             // Check auth
             // Only user itself and user with admin priv can kill connection
-            if 
(!killCtx.getQualifiedUser().equals(ConnectContext.get().getQualifiedUser())
-                    && 
!Env.getCurrentEnv().getAccessManager().checkGlobalPriv(ConnectContext.get(),
-                    PrivPredicate.ADMIN)) {
-                
ErrorReport.reportDdlException(ErrorCode.ERR_KILL_DENIED_ERROR, id);
-            }
-
-            killCtx.kill(killStmt.isConnectionKill());
+            ErrorReport.reportDdlException(ErrorCode.ERR_KILL_DENIED_ERROR, 
id);
         }

Review Comment:
   why not context.setKilled()?  Is this useless? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to