diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/metrics/EventChannel.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/metrics/EventChannel.java index 83e844a0b1..8c998ed562 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/metrics/EventChannel.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/metrics/EventChannel.java @@ -71,10 +71,7 @@ public class EventChannel { public void run() { while (!isStop.get() || !queue.isEmpty()) { try { - Event e = queue.poll(); - if (e == null) { - continue; - } + Event e = queue.take(); for (EventConsumer consumer : consumers.get(e.getClass())) { if (enhancers.containsKey(e.getClass())) { enhancers.get(e.getClass()).enhance(e); @@ -115,14 +112,5 @@ public class EventChannel { */ public void stop() { isStop.set(true); - if (thread != null) { - try { - thread.join(); - } catch (InterruptedException e) { - LOG.warn("join worker failed.", e); - } finally { - thread = null; - } - } } } 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 214f983c8b..090af9f695 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 @@ -144,7 +144,7 @@ public class VariableMgr { if (!attr.checker().equals("")) { Preconditions.checkArgument(obj instanceof SessionVariable); try { - SessionVariable.class.getDeclaredMethod(attr.checker()).invoke(obj); + SessionVariable.class.getDeclaredMethod(attr.checker(), String.class).invoke(obj, value); } catch (Exception e) { ErrorReport.reportDdlException(ErrorCode.ERR_INVALID_VALUE, attr.name(), value, e.getMessage()); } @@ -527,6 +527,7 @@ public class VariableMgr { // the function name that check the VarAttr before setting it to sessionVariable // only support check function: 0 argument and 0 return value, if an error occurs, throw an exception. + // the checker function should be: public void checker(String value), value is the input string. String checker() default ""; // Set to true if the variables need to be forwarded along with forward statement.