This is an automated email from the ASF dual-hosted git repository. dataroaring 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 be617a34394 branch-3.0: [fix](set variable)Set local session variable when set global variable on Observer. #48468 (#48498) be617a34394 is described below commit be617a3439426ea7e873ef2acb49dda7870e89ed Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Sat Mar 1 10:06:39 2025 +0800 branch-3.0: [fix](set variable)Set local session variable when set global variable on Observer. #48468 (#48498) Cherry-picked from #48468 Co-authored-by: James <lijib...@selectdb.com> --- .../src/main/java/org/apache/doris/qe/VariableMgr.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java b/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java index 1305b2944ab..6def34fd713 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java @@ -309,28 +309,12 @@ public class VariableMgr { return joiner.toString(); } - // The only difference between setVar and setVarForNonMasterFE - // is that setVarForNonMasterFE will just return if "checkUpdate" throw exception. - // This is because, when setting global variables from Non Master FE, Doris will do following step: - // 1. forward this SetStmt to Master FE to execute. - // 2. Change this SetStmt to "SESSION" level, and execute it again on this Non Master FE. - // But for "GLOBAL only" variable, such ash "password_history", it doesn't allow to set on SESSION level. - // So when doing step 2, "set password_history=xxx" without "GLOBAL" keywords will throw exception. - // So in this case, we should just ignore this exception and return. public static void setVarForNonMasterFE(SessionVariable sessionVariable, SetVar setVar) throws DdlException { VarContext varCtx = getVarContext(setVar.getVariable()); if (varCtx == null) { ErrorReport.reportDdlException(ErrorCode.ERR_UNKNOWN_SYSTEM_VARIABLE, setVar.getVariable()); } - try { - checkUpdate(setVar, varCtx.getFlag()); - } catch (DdlException e) { - if (LOG.isDebugEnabled()) { - LOG.debug("no need to set var for non master fe: {}", setVar.getVariable(), e); - } - return; - } setVarInternal(sessionVariable, setVar, varCtx); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org