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

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


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

commit a2d967426bb2f94d9cf6c430ef126a6bce3f4569
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jan 8 19:34:25 2025 +0800

    branch-3.0: [enhance](auth)Reduce the scope of permission locks #46115 
(#46450)
    
    Cherry-picked from #46115
    
    Co-authored-by: zhangdong <zhangd...@selectdb.com>
---
 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 1c53287267b..b6a57b56c44 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
@@ -681,11 +681,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