Skip to content

Commit

Permalink
branch-2.1: [enhance](auth)Reduce the scope of permission locks #46115 (
Browse files Browse the repository at this point in the history
#46451)

Cherry-picked from #46115

Co-authored-by: zhangdong <[email protected]>
  • Loading branch information
github-actions[bot] and zddr authored Jan 6, 2025
1 parent 4b69673 commit 53889cb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,11 @@ public void replayGrant(PrivInfo privInfo) {
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");
Expand Down

0 comments on commit 53889cb

Please sign in to comment.