morningman commented on a change in pull request #5620: URL: https://github.com/apache/incubator-doris/pull/5620#discussion_r613087692
########## File path: fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java ########## @@ -102,6 +103,11 @@ public static final int READ_ONLY = 8; // Variables with this flag can not be seen with `SHOW VARIABLES` statement. public static final int INVISIBLE = 16; + // session origin value + private static final Map<Field,String> sessionOriginValue; Review comment: ```suggestion private static final Map<Field, String> sessionOriginValue; ``` ########## File path: fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java ########## @@ -253,7 +253,10 @@ public void execute() throws Exception { // Exception: // IOException: talk with client failed. public void execute(TUniqueId queryId) throws Exception { - + // origin value init + VariableMgr.setIsSingleSetVar(false); + VariableMgr.clearMapSessionOriginValue(); Review comment: So `isSingleSetVar` and `sessionOriginValue` should be set in `SessionVariables` instance. ########## File path: fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java ########## @@ -118,6 +124,7 @@ // Form map from variable name to its field in Java class. static { + sessionOriginValue = new HashMap<Field,String>(); Review comment: ```suggestion sessionOriginValue = new HashMap<Field, String>(); ``` ########## File path: fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java ########## @@ -253,7 +253,10 @@ public void execute() throws Exception { // Exception: // IOException: talk with client failed. public void execute(TUniqueId queryId) throws Exception { - + // origin value init + VariableMgr.setIsSingleSetVar(false); + VariableMgr.clearMapSessionOriginValue(); Review comment: VariableMgr is a thread safe class. But `execute()` can be called by multi threads -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org