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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 53889cbbb6f branch-2.1: [enhance](auth)Reduce the scope of permission 
locks #46115 (#46451)
53889cbbb6f is described below

commit 53889cbbb6f84b50c59069b270372ffe02a8dcc4
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Jan 6 18:51:09 2025 +0800

    branch-2.1: [enhance](auth)Reduce the scope of permission locks #46115 
(#46451)
    
    Cherry-picked from #46115
    
    Co-authored-by: zhangdong <[email protected]>
---
 fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java 
b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java
index 3ac1068687c..9bca8a2a5db 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java
@@ -595,11 +595,11 @@ public class Auth implements Writable {
     private void grantInternal(UserIdentity userIdent, String role, 
TablePattern tblPattern, PrivBitSet privs,
             Map<ColPrivilegeKey, Set<String>> colPrivileges, boolean 
errOnNonExist, boolean isReplay)
             throws DdlException {
+        if (!isReplay) {
+            checkTablePatternExist(tblPattern, privs);
+        }
         writeLock();
         try {
-            if (!isReplay) {
-                checkTablePatternExist(tblPattern, privs);
-            }
             if (role == null) {
                 if (!doesUserExist(userIdent)) {
                     throw new DdlException("user " + userIdent + " does not 
exist");


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

Reply via email to