englefly commented on code in PR #47579:
URL: https://github.com/apache/doris/pull/47579#discussion_r1948456504


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java:
##########
@@ -309,14 +309,17 @@ protected LogicalPlan preprocess(LogicalPlan logicalPlan) 
{
      *       row < 1G: 5 sec
      *       1G <= row < 10G: 10 sec
      *       10G < row: 50 sec
-     * 2. cloud mode, config it to 300 sec (TODO: refine this in the future)
+     * 2. cloud mode, config it as query time out
      */
     private void configRuntimeFilterWaitTime() {
-        if (ConnectContext.get() != null && 
ConnectContext.get().getSessionVariable().getRuntimeFilterWaitTimeMs()
-                != 
VariableMgr.getDefaultSessionVariable().getRuntimeFilterWaitTimeMs()) {
+        if (ConnectContext.get() != null && 
ConnectContext.get().getSessionVariable() != null
+                && 
ConnectContext.get().getSessionVariable().getRuntimeFilterWaitTimeMs()
+                == 
VariableMgr.getDefaultSessionVariable().getRuntimeFilterWaitTimeMs()) {
             SessionVariable sessionVariable = 
ConnectContext.get().getSessionVariable();
             if (Config.isCloudMode()) {
-                
sessionVariable.setVarOnce(SessionVariable.RUNTIME_FILTER_WAIT_TIME_MS, 
"300000");
+                
sessionVariable.setVarOnce(SessionVariable.RUNTIME_FILTER_WAIT_TIME_MS,
+                        
String.valueOf(Math.max(VariableMgr.getDefaultSessionVariable().getRuntimeFilterWaitTimeMs(),
+                                1000 * sessionVariable.getQueryTimeoutS())));

Review Comment:
   if wait time is query_timeout, it is equivalents to wait infinitely.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

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

Reply via email to