This is an automated email from the ASF dual-hosted git repository.

gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bd5402378 [bug](udf) add synchronized to test resolve error of zip 
file closed (#17812)
5bd5402378 is described below

commit 5bd54023787b80ecd50b2be19c8d949ad61f57df
Author: zhangstar333 <87313068+zhangstar...@users.noreply.github.com>
AuthorDate: Fri Mar 17 14:35:26 2023 +0800

    [bug](udf) add synchronized to test resolve error of zip file closed 
(#17812)
---
 .../apache/doris/analysis/CreateFunctionStmt.java  | 31 +++++++++++++++++-----
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java
index af1abe1197..56efc490af 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java
@@ -175,14 +175,31 @@ public class CreateFunctionStmt extends DdlStmt {
     public void analyze(Analyzer analyzer) throws UserException {
         super.analyze(analyzer);
 
-        analyzeCommon(analyzer);
-        // check
-        if (isAggregate) {
-            analyzeUda();
-        } else if (isAlias) {
-            analyzeAliasFunction();
+        // https://github.com/apache/doris/issues/17810
+        // this error report in P0 test, so we suspect that it is related to 
concurrency
+        // add this change to test it.
+        if (Config.use_fuzzy_session_variable) {
+            synchronized (CreateFunctionStmt.class) {
+                analyzeCommon(analyzer);
+                // check
+                if (isAggregate) {
+                    analyzeUda();
+                } else if (isAlias) {
+                    analyzeAliasFunction();
+                } else {
+                    analyzeUdf();
+                }
+            }
         } else {
-            analyzeUdf();
+            analyzeCommon(analyzer);
+            // check
+            if (isAggregate) {
+                analyzeUda();
+            } else if (isAlias) {
+                analyzeAliasFunction();
+            } else {
+                analyzeUdf();
+            }
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to