branch-2.1: [fix](auth)Fix after fe restarting, external permissions are lost (#43307)

Cherry-picked from #43275

Co-authored-by: zhangdong <493738387@qq.com>
This commit is contained in:
github-actions[bot]
2024-11-06 14:54:59 +08:00
committed by GitHub
parent 876fae6f71
commit 8fedb03fdc
3 changed files with 80 additions and 1 deletions

View File

@ -597,7 +597,9 @@ public class Auth implements Writable {
throws DdlException {
writeLock();
try {
checkTablePatternExist(tblPattern);
if (!isReplay) {
checkTablePatternExist(tblPattern);
}
if (role == null) {
if (!doesUserExist(userIdent)) {
throw new DdlException("user " + userIdent + " does not exist");