From 15662c06e6691bf95dfc9706473fdfe235e2cab7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 20:44:54 +0800 Subject: [PATCH] branch-2.1: [fix](auth)Ignore replay edit log error of auth #49348 (#49787) Cherry-picked from #49348 Co-authored-by: zhangdong --- .../org/apache/doris/mysql/privilege/Auth.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 e5161a8cc2..3d528db72f 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 @@ -511,8 +511,12 @@ public class Auth implements Writable { dropUserInternal(stmt.getUserIdentity(), stmt.isSetIfExists(), false); } - public void replayDropUser(UserIdentity userIdent) throws DdlException { - dropUserInternal(userIdent, false, true); + public void replayDropUser(UserIdentity userIdent) { + try { + dropUserInternal(userIdent, false, true); + } catch (DdlException e) { + LOG.error("should not happen", e); + } } private void dropUserInternal(UserIdentity userIdent, boolean ignoreIfNonExists, boolean isReplay) @@ -1026,8 +1030,12 @@ public class Auth implements Writable { updateUserPropertyInternal(stmt.getUser(), properties, false /* is replay */); } - public void replayUpdateUserProperty(UserPropertyInfo propInfo) throws UserException { - updateUserPropertyInternal(propInfo.getUser(), propInfo.getProperties(), true /* is replay */); + public void replayUpdateUserProperty(UserPropertyInfo propInfo) { + try { + updateUserPropertyInternal(propInfo.getUser(), propInfo.getProperties(), true /* is replay */); + } catch (UserException e) { + LOG.error("should not happened", e); + } } public void updateUserPropertyInternal(String user, List> properties, boolean isReplay)