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

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


The following commit(s) were added to refs/heads/master by this push:
     new a32408dfd98 [opt](auth)Reduce the scope of permission locks (#46115)
a32408dfd98 is described below

commit a32408dfd982235dffd19d1e63aa2572518d0e17
Author: zhangdong <zhangd...@selectdb.com>
AuthorDate: Mon Jan 6 14:36:24 2025 +0800

    [opt](auth)Reduce the scope of permission locks (#46115)
---
 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 42e26cd4d05..ad825bd7c2d 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
@@ -685,11 +685,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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to